From: Sage Weil Date: Mon, 16 Oct 2017 15:47:39 +0000 (-0500) Subject: osd: flush before collection_list() X-Git-Tag: v12.2.6~98^2~26 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=9f3eb06b3b2bb1d28d34835145b112ecba649566;p=ceph.git osd: flush before collection_list() 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 (cherry picked from commit b877860e4246cdd21b5ee79f17756efcf71b311e) --- diff --git a/src/osd/PG.cc b/src/osd/PG.cc index 6534979a1ee..8288d55b964 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -4251,6 +4251,7 @@ int PG::build_scrub_map_chunk( // objects vector ls; vector 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 objects; + osr->flush(); ret = get_pgbackend()->objects_list_partial( start, min, diff --git a/src/osd/PrimaryLogPG.cc b/src/osd/PrimaryLogPG.cc index ac54b060577..98a998f5739 100644 --- a/src/osd/PrimaryLogPG.cc +++ b/src/osd/PrimaryLogPG.cc @@ -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);