From cabc48c40332875e8827f4f0e6dbde9ab7e9fd7a Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Thu, 30 May 2019 10:06:06 -0500 Subject: [PATCH] osd/PrimaryLogPG: use osdmap removed_snaps_queue for snap trimming No need to use the pg_pool_t member now--the osdmap has a queue specifically for the snaps we are in the process of trimming. Signed-off-by: Sage Weil --- src/osd/PrimaryLogPG.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/osd/PrimaryLogPG.cc b/src/osd/PrimaryLogPG.cc index b78337d32c8..7bed099784a 100644 --- a/src/osd/PrimaryLogPG.cc +++ b/src/osd/PrimaryLogPG.cc @@ -4243,11 +4243,13 @@ int PrimaryLogPG::trim_object( } set new_snaps; + const OSDMapRef& osdmap = get_osdmap(); for (set::iterator i = old_snaps.begin(); i != old_snaps.end(); ++i) { - if (!pool.info.is_removed_snap(*i)) + if (!osdmap->in_removed_snaps_queue(info.pgid.pgid.pool(), *i)) { new_snaps.insert(*i); + } } vector::iterator p = snapset.clones.end(); -- 2.47.3