]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/os/bluestore/AvlAllocator.cc
update ceph source to reef 18.2.1
[ceph.git] / ceph / src / os / bluestore / AvlAllocator.cc
index 26eba36a0ec20be4f3288d4b970d82c2bd5dbf1a..afa541862fb8f3f64043906338526da972b70ecf 100644 (file)
@@ -39,7 +39,7 @@ uint64_t AvlAllocator::_pick_block_after(uint64_t *cursor,
   uint64_t search_bytes = 0;
   auto rs_start = range_tree.lower_bound(range_t{*cursor, size}, compare);
   for (auto rs = rs_start; rs != range_tree.end(); ++rs) {
-    uint64_t offset = p2roundup(rs->start, align);
+    uint64_t offset = rs->start;
     *cursor = offset + size;
     if (offset + size <= rs->end) {
       return offset;
@@ -59,7 +59,7 @@ uint64_t AvlAllocator::_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->start, align);
+    uint64_t offset = rs->start;
     *cursor = offset + size;
     if (offset + size <= rs->end) {
       return offset;
@@ -82,7 +82,7 @@ uint64_t AvlAllocator::_pick_block_fits(uint64_t size,
   const auto compare = range_size_tree.key_comp();
   auto rs_start = range_size_tree.lower_bound(range_t{0, size}, compare);
   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->end) {
       return offset;
     }