From: Josh Durgin Date: Sat, 24 Aug 2019 02:52:52 +0000 (-0400) Subject: os/bluestore: record gifts < expected size in superblock X-Git-Tag: v12.2.13~146^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=8dd46388d2090e975674676c6ff753f7a2d3beb5;p=ceph.git os/bluestore: record gifts < expected size in superblock 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 --- diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc index 190189fb6bb..4d3b2fa15e2 100644 --- a/src/os/bluestore/BlueStore.cc +++ b/src/os/bluestore/BlueStore.cc @@ -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();