From 096449813272af262be27baf4205eaf3c542b78d Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 11 Jun 2019 13:54:45 -0500 Subject: [PATCH] osd/PrimaryLogPG: only filter SnapSet::snaps for flush for pre-octopus compat Signed-off-by: Sage Weil --- src/osd/PrimaryLogPG.cc | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/osd/PrimaryLogPG.cc b/src/osd/PrimaryLogPG.cc index 021fd4ba1ba..4a6073b85b0 100644 --- a/src/osd/PrimaryLogPG.cc +++ b/src/osd/PrimaryLogPG.cc @@ -9801,8 +9801,15 @@ int PrimaryLogPG::start_flush( << " " << (blocking ? "blocking" : "non-blocking/best-effort") << dendl; - // get a filtered snapset, need to remove removed snaps - SnapSet snapset = obc->ssc->snapset.get_filtered(pool.info); + SnapSet snapset; + if (get_osdmap()->require_osd_release >= ceph_release_t::octopus) { + // NOTE: change this to a const ref when we remove this compat code + snapset = obc->ssc->snapset; + } else { + // for pre-octopus compatibility, filter SnapSet::snaps. not + // certain we need this, but let's be conservative. + snapset = obc->ssc->snapset.get_filtered(pool.info); + } // verify there are no (older) check for dirty clones { -- 2.39.5