Skip to content

Commit

Permalink
ReplicatedPG::release_op_ctx_locks: requeue in scrub queue if blocked
Browse files Browse the repository at this point in the history
Otherwise we can reorder an op around another op which got blocked by a
scrub which started after the first blocked on an obc.

Fixes: ceph#11691
Signed-off-by: Samuel Just <[email protected]>
  • Loading branch information
athanatos committed May 29, 2015
1 parent 5c2b795 commit be873eb
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion src/osd/ReplicatedPG.h
Original file line number Diff line number Diff line change
Expand Up @@ -866,7 +866,20 @@ class ReplicatedPG : public PG, public PGBackend::Listener {
requeue_snaptrimmer_clone ||
requeue_snaptrimmer_snapset)
queue_snap_trim();
requeue_ops(to_req);

if (!to_req.empty()) {
assert(ctx->obc);
// requeue at front of scrub blocking queue if we are blocked by scrub
if (scrubber.write_blocked_by_scrub(ctx->obc->obs.oi.soid.get_head())) {
waiting_for_active.splice(
waiting_for_active.begin(),
to_req,
to_req.begin(),
to_req.end());
} else {
requeue_ops(to_req);
}
}
}

// replica ops
Expand Down

0 comments on commit be873eb

Please sign in to comment.