]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
PG: fix adjust_local_snaps bug
authorSamuel Just <samuel.just@dreamhost.com>
Tue, 18 Jan 2011 21:16:34 +0000 (13:16 -0800)
committerSamuel Just <samuel.just@dreamhost.com>
Tue, 18 Jan 2011 21:16:34 +0000 (13:16 -0800)
current must be removed from to_remove in the loop for the loop to
terminate (and not cause a double erasure from snap_collections)!

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

index af0acd958ff0cc9494e14a04c87fc4c0e5c14ce2..46e01e703e4fc2155c87e855c2e5ea620c62ab2d 100644 (file)
@@ -2699,6 +2699,7 @@ void PG::adjust_local_snaps(ObjectStore::Transaction &t, interval_set<snapid_t>
     snapid_t current = to_remove.range_start();
     coll_t c(info.pgid, current);
     t.remove_collection(c);
+    to_remove.erase(current);
     snap_collections.erase(current);
   }
   write_info(t);