]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ReplicatedPG:snap_trimmer should return if !clean or !active or !primary
authorSamuel Just <samuel.just@dreamhost.com>
Thu, 3 Feb 2011 18:31:47 +0000 (10:31 -0800)
committerSamuel Just <samuel.just@dreamhost.com>
Thu, 3 Feb 2011 18:31:47 +0000 (10:31 -0800)
The PG may become !clean or !active while in the osd snap_trim_wq.

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
src/osd/ReplicatedPG.cc

index 5f8567f75121ae3dcb064744d59b0faffe366bf8..eb7358e6cf45a5963ac147029d3de2c24ae071ab 100644 (file)
@@ -525,8 +525,8 @@ void ReplicatedPG::do_sub_op_reply(MOSDSubOpReply *r)
 
 bool ReplicatedPG::snap_trimmer()
 {
-  assert(is_primary() && is_clean());
   lock();
+  if (!(is_primary() && is_clean() && is_active())) return true;
   dout(10) << "snap_trimmer start, purged_snaps " << info.purged_snaps << dendl;
 
   interval_set<snapid_t> s;