From: Samuel Just Date: Thu, 10 Feb 2011 23:45:22 +0000 (-0800) Subject: ReplicatedPG: snap_trimmer should bail out while finalizing_scrub X-Git-Tag: v0.25~68 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=74346592014560d69187aec0fd5d427d0ea91419;p=ceph.git ReplicatedPG: snap_trimmer should bail out while finalizing_scrub Check to make sure !finalizing_scrub when relocking. Signed-off-by: Samuel Just --- diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index b243b5790010..e4bf9d4788fb 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -623,10 +623,11 @@ void ReplicatedPG::do_sub_op_reply(MOSDSubOpReply *r) bool ReplicatedPG::snap_trimmer() { lock(); - if (!(is_primary() && is_clean() && is_active())) { + if (!(is_primary() && is_clean() && is_active() && !finalizing_scrub)) { unlock(); return true; } + dout(10) << "snap_trimmer start, purged_snaps " << info.purged_snaps << dendl; interval_set s; @@ -823,6 +824,12 @@ bool ReplicatedPG::snap_trimmer() // give other threads a chance at this pg unlock(); lock(); + + if (finalizing_scrub) { + unlock(); + return true; + } + if (!(current_set_started == info.history.last_epoch_started && is_active())) { break; @@ -855,6 +862,10 @@ bool ReplicatedPG::snap_trimmer() // reflected when we scan the next collection set. osd->store->flush(); lock(); + + if (finalizing_scrub) { + return true; + } } // done