]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
src/os/bluestore/BlueStore.cc: Use static_cast<uint64_t> to fix 32bit compilation 45185/head
authorDuncan Bellamy <dunk@denkimushi.com>
Sun, 27 Feb 2022 17:31:29 +0000 (17:31 +0000)
committerKefu Chai <tchaikov@gmail.com>
Thu, 12 May 2022 05:36:44 +0000 (13:36 +0800)
Fixes: https://tracker.ceph.com/issues/54415
Signed-off-by: Duncan Bellamy <dunk@denkimushi.com>
src/os/bluestore/BlueStore.cc

index 1263f19a4c710dc5892302bd8172fcd77c36c817..90046936983fb567e5026cb1cafb2a7193709b57 100644 (file)
@@ -18554,7 +18554,7 @@ int BlueStore::__restore_allocator(Allocator* allocator, uint64_t *num, uint64_t
   uint64_t        extent_count       = 0;
   uint64_t        extents_bytes_left = file_size - (header_size + trailer_size + sizeof(crc));
   while (extents_bytes_left) {
-    int req_bytes  = std::min(extents_bytes_left, sizeof(buffer));
+    int req_bytes  = std::min(extents_bytes_left, static_cast<uint64_t>(sizeof(buffer)));
     int read_bytes = bluefs->read(p_handle.get(), offset, req_bytes, nullptr, (char*)buffer);
     if (read_bytes != req_bytes) {
       derr << "Failed bluefs->read()::read_bytes=" << read_bytes << ", req_bytes=" << req_bytes << dendl;