mirror of
https://github.com/ceph/ceph
synced 2025-02-16 07:17:21 +00:00
ReplicatedPG: fail a non-blocking flush if the object is being scrubbed
Fixes: #8011 Backport: firefly, giant Signed-off-by: Samuel Just <sjust@redhat.com>
This commit is contained in:
parent
4be687bf44
commit
9b26de3f36
@ -6614,6 +6614,19 @@ int ReplicatedPG::try_flush_mark_clean(FlushOpRef fop)
|
||||
return -EBUSY;
|
||||
}
|
||||
|
||||
if (!fop->blocking && scrubber.write_blocked_by_scrub(oid)) {
|
||||
if (fop->op) {
|
||||
dout(10) << __func__ << " blocked by scrub" << dendl;
|
||||
requeue_op(fop->op);
|
||||
requeue_ops(fop->dup_ops);
|
||||
return -EAGAIN; // will retry
|
||||
} else {
|
||||
osd->logger->inc(l_osd_tier_try_flush_fail);
|
||||
cancel_flush(fop, false);
|
||||
return -ECANCELED;
|
||||
}
|
||||
}
|
||||
|
||||
// successfully flushed; can we clear the dirty bit?
|
||||
// try to take the lock manually, since we don't
|
||||
// have a ctx yet.
|
||||
|
Loading…
Reference in New Issue
Block a user