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 <sage@redhat.com>
This commit is contained in:
Sage Weil 2019-05-30 10:06:06 -05:00
parent 3f9c28823a
commit cabc48c403

View File

@ -4243,11 +4243,13 @@ int PrimaryLogPG::trim_object(
}
set<snapid_t> new_snaps;
const OSDMapRef& osdmap = get_osdmap();
for (set<snapid_t>::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<snapid_t>::iterator p = snapset.clones.end();