From c88d860dcef695124ae0d7af72b8e3046ee4bc41 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 11 Jun 2019 13:52:32 -0500 Subject: [PATCH] osd/PrimaryLogPG: trim_objects: only filter SnapSet::snaps for pre-octopus For octopus and later, we don't need SnapSet::snaps. Signed-off-by: Sage Weil --- src/osd/PrimaryLogPG.cc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/osd/PrimaryLogPG.cc b/src/osd/PrimaryLogPG.cc index eb1eeab046d..021fd4ba1ba 100644 --- a/src/osd/PrimaryLogPG.cc +++ b/src/osd/PrimaryLogPG.cc @@ -4432,8 +4432,13 @@ int PrimaryLogPG::trim_object( head_obc->obs.oi = object_info_t(head_oid); t->remove(head_oid); } else { - dout(10) << coid << " filtering snapset on " << head_oid << dendl; - snapset.filter(pool.info); + if (get_osdmap()->require_osd_release < ceph_release_t::octopus) { + // filter SnapSet::snaps for the benefit of pre-octopus + // peers. This is perhaps overly conservative in that I'm not + // certain they need this, but let's be conservative here. + dout(10) << coid << " filtering snapset on " << head_oid << dendl; + snapset.filter(pool.info); + } dout(10) << coid << " writing updated snapset on " << head_oid << ", snapset is " << snapset << dendl; ctx->log.push_back( -- 2.39.5