mirror of
https://github.com/ceph/ceph
synced 2024-12-19 01:46:00 +00:00
osd: tiering: proxy reads during promote
wip 9980. Do proxy read and async promotion for writeback. Signed-off-by: Zhiqiang Wang <zhiqiang.wang@intel.com>
This commit is contained in:
parent
4dc9990e7e
commit
8e145e08ed
@ -1797,21 +1797,24 @@ bool ReplicatedPG::maybe_handle_cache(OpRequestRef op,
|
||||
promote_object(obc, missing_oid, oloc, op);
|
||||
return true;
|
||||
}
|
||||
|
||||
// Always proxy
|
||||
do_proxy_read(op);
|
||||
|
||||
// Promote too?
|
||||
switch (pool.info.min_read_recency_for_promote) {
|
||||
case 0:
|
||||
promote_object(obc, missing_oid, oloc, op);
|
||||
promote_object(obc, missing_oid, oloc, OpRequestRef());
|
||||
break;
|
||||
case 1:
|
||||
// Check if in the current hit set
|
||||
if (in_hit_set) {
|
||||
promote_object(obc, missing_oid, oloc, op);
|
||||
} else {
|
||||
do_cache_redirect(op, obc);
|
||||
promote_object(obc, missing_oid, oloc, OpRequestRef());
|
||||
}
|
||||
break;
|
||||
default:
|
||||
if (in_hit_set) {
|
||||
promote_object(obc, missing_oid, oloc, op);
|
||||
promote_object(obc, missing_oid, oloc, OpRequestRef());
|
||||
} else {
|
||||
// Check if in other hit sets
|
||||
map<time_t,HitSetRef>::iterator itor;
|
||||
@ -1823,9 +1826,7 @@ bool ReplicatedPG::maybe_handle_cache(OpRequestRef op,
|
||||
}
|
||||
}
|
||||
if (in_other_hit_sets) {
|
||||
promote_object(obc, missing_oid, oloc, op);
|
||||
} else {
|
||||
do_cache_redirect(op, obc);
|
||||
promote_object(obc, missing_oid, oloc, OpRequestRef());
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user