mirror of
https://github.com/ceph/ceph
synced 2025-02-20 17:37:29 +00:00
Merge pull request #4162 from athanatos/wip-11156
ReplicatedPG::promote_object: check scrubber and block if necessary Reviewed-by: Sage Weil <sage@redhat.com>
This commit is contained in:
commit
4dbb9c872e
@ -2179,6 +2179,19 @@ void ReplicatedPG::promote_object(ObjectContextRef obc,
|
||||
obc = get_object_context(missing_oid, true);
|
||||
}
|
||||
dout(10) << __func__ << " " << obc->obs.oi.soid << dendl;
|
||||
if (scrubber.write_blocked_by_scrub(obc->obs.oi.soid)) {
|
||||
dout(10) << __func__ << " " << obc->obs.oi.soid
|
||||
<< " blocked by scrub" << dendl;
|
||||
if (op) {
|
||||
waiting_for_active.push_back(op);
|
||||
dout(10) << __func__ << " " << obc->obs.oi.soid
|
||||
<< " placing op in waiting_for_active" << dendl;
|
||||
} else {
|
||||
dout(10) << __func__ << " " << obc->obs.oi.soid
|
||||
<< " no op, dropping on the floor" << dendl;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
PromoteCallback *cb = new PromoteCallback(obc, this);
|
||||
object_locator_t my_oloc = oloc;
|
||||
|
@ -1147,7 +1147,10 @@ protected:
|
||||
*/
|
||||
void do_cache_redirect(OpRequestRef op);
|
||||
/**
|
||||
* This function starts up a copy from
|
||||
* This function attempts to start a promote. Either it succeeds,
|
||||
* or places op on a wait list. If op is null, failure means that
|
||||
* this is a noop. If a future user wants to be able to distinguish
|
||||
* these cases, a return value should be added.
|
||||
*/
|
||||
void promote_object(ObjectContextRef obc, ///< [optional] obc
|
||||
const hobject_t& missing_object, ///< oid (if !obc)
|
||||
|
Loading…
Reference in New Issue
Block a user