]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/PG: flush osr before listing scrub objects
authorSage Weil <sage@redhat.com>
Wed, 29 Nov 2017 22:56:38 +0000 (16:56 -0600)
committerSage Weil <sage@redhat.com>
Sun, 14 Jan 2018 16:47:25 +0000 (10:47 -0600)
We need to make sure previous transactions are readable before we list
objects.  This avoids races like, say,

- ecbackend rolls forward and removes a rollback object
- bluestore delays the txn apply due to some prior op
- scrub lists objects, sees rollback object it doesn't expect

Signed-off-by: Sage Weil <sage@redhat.com>
src/osd/PG.cc

index cffa631967354e7e951ae1ef9947351e93e8df24..ad6faf00c10b136f66619a9b44773edf5dd7576a 100644 (file)
@@ -4204,6 +4204,8 @@ int PG::build_scrub_map_chunk(
 
   map.valid_through = info.last_update;
 
+  osr->flush();
+
   // objects
   vector<hobject_t> ls;
   vector<ghobject_t> rollback_obs;