]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/os/bluestore/bluefs_types.h
import ceph 12.2.12
[ceph.git] / ceph / src / os / bluestore / bluefs_types.h
index b5bf775cb7b31b44c1d4e07e3419f8fca3e4979a..128dac32621ea6856ad4d7b2ae0bbcfd309e5a55 100644 (file)
@@ -8,13 +8,16 @@
 #include "include/encoding.h"
 #include "include/denc.h"
 
-class bluefs_extent_t : public AllocExtent{
+class bluefs_extent_t {
 public:
   uint8_t bdev;
+  uint64_t offset = 0;
+  uint32_t length = 0;
 
   bluefs_extent_t(uint8_t b = 0, uint64_t o = 0, uint32_t l = 0)
-    : AllocExtent(o, l), bdev(b) {}
+    : bdev(b), offset(o), length(l) {}
 
+  uint64_t end() const { return  offset + length; }
   DENC(bluefs_extent_t, v, p) {
     DENC_START(1, 1, p);
     denc_lba(v.offset, p);
@@ -127,7 +130,7 @@ struct bluefs_super_t {
       block_size(4096) { }
 
   uint64_t block_mask() const {
-    return ~(block_size - 1);
+    return ~((uint64_t)block_size - 1);
   }
 
   void encode(bufferlist& bl) const;