]> 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)
committerDavid Zafman <dzafman@redhat.com>
Fri, 18 May 2018 16:37:55 +0000 (09:37 -0700)
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>
(cherry picked from commit dca1257ab13e7871f25ef1c8179e45c199b252f7)

src/osd/PG.cc

index 5ea286cdaa05e34c631f9da2946e4bd1911c9432..ec3178103026d86957b62b565f400b4fd1a97e4a 100644 (file)
@@ -4245,6 +4245,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;