]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/PrimaryLogPG: use osdmap removed_snaps_queue for snap trimming
authorSage Weil <sage@redhat.com>
Thu, 30 May 2019 15:06:06 +0000 (10:06 -0500)
committerSage Weil <sage@redhat.com>
Tue, 2 Jul 2019 13:37:48 +0000 (08:37 -0500)
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>
src/osd/PrimaryLogPG.cc

index b78337d32c83e276bfbd8584a9f0c3154e97a133..7bed099784acf43a1545addfd3902c44770d1151 100644 (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();