]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/os/seastore/cache.h: only retire extent if not already retired and not fresh
authorSamuel Just <sjust@redhat.com>
Tue, 26 May 2020 18:15:28 +0000 (11:15 -0700)
committerSamuel Just <sjust@redhat.com>
Tue, 2 Jun 2020 23:56:41 +0000 (16:56 -0700)
Signed-off-by: Samuel Just <sjust@redhat.com>
src/crimson/os/seastore/cache.h

index f0b5faf96aee982fb0cb757b4fa030ecd2c4e2ad..3007ba6d2294a916885a0bc4a078d9f5558c56df 100644 (file)
@@ -50,8 +50,12 @@ class Transaction {
   }
 
   void add_to_retired_set(CachedExtentRef ref) {
-    ceph_assert(retired_set.count(ref->get_paddr()) == 0);
-    retired_set.insert(ref);
+    if (!ref->is_initial_pending()) {
+      // && retired_set.count(ref->get_paddr()) == 0
+      // If it's already in the set, insert here will be a noop,
+      // which is what we want.
+      retired_set.insert(ref);
+    }
   }
 
   void add_to_read_set(CachedExtentRef ref) {