]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/os/bluestore/BtreeAllocator.cc
update ceph source to reef 18.2.1
[ceph.git] / ceph / src / os / bluestore / BtreeAllocator.cc
index cf08d7ae7d31f0fa14af2df2a157022b7339f849..2455ec111b17054f6781af01ae3dcbf9a83cff59 100644 (file)
@@ -25,7 +25,7 @@ uint64_t BtreeAllocator::_pick_block_after(uint64_t *cursor,
 {
   auto rs_start = range_tree.lower_bound(*cursor);
   for (auto rs = rs_start; rs != range_tree.end(); ++rs) {
-    uint64_t offset = p2roundup(rs->first, align);
+    uint64_t offset = rs->first;
     if (offset + size <= rs->second) {
       *cursor = offset + size;
       return offset;
@@ -37,7 +37,7 @@ uint64_t BtreeAllocator::_pick_block_after(uint64_t *cursor,
   }
   // If we reached end, start from beginning till cursor.
   for (auto rs = range_tree.begin(); rs != rs_start; ++rs) {
-    uint64_t offset = p2roundup(rs->first, align);
+    uint64_t offset = rs->first;
     if (offset + size <= rs->second) {
       *cursor = offset + size;
       return offset;
@@ -53,7 +53,7 @@ uint64_t BtreeAllocator::_pick_block_fits(uint64_t size,
   // the needs
   auto rs_start = range_size_tree.lower_bound(range_value_t{0,size});
   for (auto rs = rs_start; rs != range_size_tree.end(); ++rs) {
-    uint64_t offset = p2roundup(rs->start, align);
+    uint64_t offset = rs->start;
     if (offset + size <= rs->start + rs->size) {
       return offset;
     }