]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: record gifts < expected size in superblock 29860/head
authorJosh Durgin <jdurgin@redhat.com>
Sat, 24 Aug 2019 02:52:52 +0000 (22:52 -0400)
committerJosh Durgin <jdurgin@redhat.com>
Sat, 24 Aug 2019 02:58:28 +0000 (22:58 -0400)
Returning 0 from _balance_bluefs_freespace() skips recording
allocations in the superblock, so we fail the consistency check on
startup. The elseif branch handles this case already, so just remove
it from the first branch. This is luminous/mimic specific, since
bluefs extents are not recorded in the superblock in later releases.

Signed-off-by: Josh Durgin <jdurgin@redhat.com>
src/os/bluestore/BlueStore.cc

index 190189fb6bbaf7fc4d01789e6f80a545be5d798b..4d3b2fa15e2f90c0a4704d19d61e6be975e94df4 100644 (file)
@@ -5377,7 +5377,7 @@ int BlueStore::_balance_bluefs_freespace(PExtentVector *extents)
        cct->_conf->bluefs_shared_alloc_size,
        0, 0, extents);
     }
-    if (alloc_len <= 0 || alloc_len < gift) {
+    if (alloc_len <= 0) {
       dout(0) << __func__ << " no allocate on 0x" << std::hex << gift << std::dec
              << dendl;
       _dump_alloc_on_rebalance_failure();