]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: flush before collection_list()
authorSage Weil <sage@redhat.com>
Mon, 16 Oct 2017 15:47:39 +0000 (10:47 -0500)
committerDavid Zafman <dzafman@redhat.com>
Fri, 18 May 2018 16:37:56 +0000 (09:37 -0700)
We would get this implicitly with FileStore if we waited for the onreadable
callbacks, but in some cases the OSD has already done that.  With BlueStore,
we need to explicitly flush().

Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit b877860e4246cdd21b5ee79f17756efcf71b311e)

src/osd/PG.cc
src/osd/PrimaryLogPG.cc

index 6534979a1eefb8c6b02560038fec2e75db82b56b..8288d55b964c5e13596857aca9e41bdd18757907 100644 (file)
@@ -4251,6 +4251,7 @@ int PG::build_scrub_map_chunk(
   // objects
   vector<hobject_t> ls;
   vector<ghobject_t> rollback_obs;
+  osr->flush();
   int ret = get_pgbackend()->objects_list_range(
     start,
     end,
@@ -4645,6 +4646,7 @@ void PG::chunky_scrub(ThreadPool::TPHandle &handle)
           hobject_t start = scrubber.start;
          hobject_t candidate_end;
          vector<hobject_t> objects;
+         osr->flush();
          ret = get_pgbackend()->objects_list_partial(
            start,
            min,
index ac54b0605772b9af84773bd4a0061db4e9c69a24..98a998f5739cad229b7bf9f450cbf27dbae9cd57 100644 (file)
@@ -12458,10 +12458,10 @@ void PrimaryLogPG::update_range(
   if (bi->version < info.log_tail) {
     dout(10) << __func__<< ": bi is old, rescanning local backfill_info"
             << dendl;
+    osr->flush();
     if (last_update_applied >= info.log_tail) {
       bi->version = last_update_applied;
     } else {
-      osr->flush();
       bi->version = info.last_update;
     }
     scan_range(local_min, local_max, bi, handle);