mirror of
https://github.com/ceph/ceph
synced 2024-12-28 06:23:08 +00:00
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:
parent
3f9c28823a
commit
cabc48c403
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user