]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: fix improper backport for p2 macros for bmap alocator 27606/head
authorIgor Fedotov <ifedotov@suse.com>
Tue, 16 Apr 2019 11:28:43 +0000 (14:28 +0300)
committerIgor Fedotov <ifedotov@suse.com>
Fri, 19 Apr 2019 10:19:37 +0000 (13:19 +0300)
Fixes: 3244c871f36ee22ee826a96f30e82a8d05c9170c
This caused TestAllocatorLevel01.test_4G_alloc_bugN to fail in mimic.

Signed-off-by: Igor Fedotov <ifedotov@suse.com>
src/os/bluestore/fastbmap_allocator_impl.cc

index 415a2fd7a9722e35e63deaa2b128301e310c8546..a486876f8cef0ebac28ad1bcce8801e872bda971 100755 (executable)
@@ -23,7 +23,7 @@ inline interval_t _align2units(uint64_t offset, uint64_t len, uint64_t min_lengt
     auto delta_off = res.offset - offset;
     if (len > delta_off) {
       res.length = len - delta_off;
-      res.length = p2align<uint32_t>(res.length, min_length);
+      res.length = p2align<uint64_t>(res.length, min_length);
       if (res.length) {
        return res;
       }
@@ -189,7 +189,7 @@ void AllocatorLevel01Loose::_analyze_partials(uint64_t pos_start,
            (ctx->min_affordable_len == 0 ||
              (longest.length < ctx->min_affordable_len))) {
 
-          ctx->min_affordable_len = p2align<uint32_t>(longest.length, min_length);
+          ctx->min_affordable_len = p2align<uint64_t>(longest.length, min_length);
          ctx->min_affordable_offs = longest.offset;
         }
         if (mode == STOP_ON_PARTIAL) {