]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: assert shared blob cache cleared on split 10963/head
authorSage Weil <sage@redhat.com>
Wed, 7 Sep 2016 14:32:50 +0000 (10:32 -0400)
committerSage Weil <sage@redhat.com>
Wed, 7 Sep 2016 15:26:07 +0000 (11:26 -0400)
Signed-off-by: Sage Weil <sage@redhat.com>
src/os/bluestore/BlueStore.cc
src/os/bluestore/BlueStore.h

index 98c85d0b85366583477eecdf4e87ce166c350faf..f09b22faeaba3096f1f05a110b2439b1cbe5801e 100644 (file)
@@ -8215,7 +8215,9 @@ int BlueStore::_split_collection(TransContext *txc,
   // blow away the caches.  FIXME.
   c->onode_map.clear();
   d->onode_map.clear();
-#warning assert that shared_blob cache (and others?) are also cleared..
+
+  assert(c->shared_blob_set.empty());
+  assert(d->shared_blob_set.empty());
 
   c->cnode.bits = bits;
   assert(d->cnode.bits == bits);
index 0c5590b7703fb33bd9b3417eaf50f44948a144d2..eac753e766b99b29468758e4b05f18ac058c0d3b 100644 (file)
@@ -376,6 +376,10 @@ public:
       }
       return false;
     }
+
+    bool empty() {
+      return uset.empty();
+    }
   };
 
   /// in-memory blob metadata and associated cached buffers (if any)