From: Sage Weil Date: Tue, 11 Jun 2019 18:54:45 +0000 (-0500) Subject: osd/PrimaryLogPG: only filter SnapSet::snaps for flush for pre-octopus compat X-Git-Tag: v15.1.0~2308^2~56 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=096449813272af262be27baf4205eaf3c542b78d;p=ceph-ci.git osd/PrimaryLogPG: only filter SnapSet::snaps for flush for pre-octopus compat Signed-off-by: Sage Weil --- 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 {