]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore/bluestore_types: blob_t::is_unreferenced() method
authorSage Weil <sage@redhat.com>
Wed, 11 May 2016 20:24:36 +0000 (16:24 -0400)
committerSage Weil <sage@redhat.com>
Wed, 1 Jun 2016 15:38:45 +0000 (11:38 -0400)
Signed-off-by: Sage Weil <sage@redhat.com>
src/os/bluestore/bluestore_types.h

index 9d9136886a471d45fdbb5e727e7654bf36c2b1c7..c0a74ef3a5c8f5b1b7fa82f9b73f1f4f5830c01c 100644 (file)
@@ -300,6 +300,10 @@ struct bluestore_blob_t {
     return p->offset + x_off;
   }
 
+  bool is_unreferenced(uint64_t offset, uint64_t length) const {
+    return !ref_map.intersects(offset, length);
+  }
+
   void map(uint64_t x_off, uint64_t x_len,
           std::function<void(uint64_t,uint64_t)> f) {
     auto p = extents.begin();