From: Sage Weil Date: Wed, 20 Sep 2017 16:38:46 +0000 (-0400) Subject: os/bluestore: ignore 0x2000~2000 extent oddity from luminous upgrade X-Git-Tag: v12.2.2~153^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F18050%2Fhead;p=ceph.git os/bluestore: ignore 0x2000~2000 extent oddity from luminous upgrade Luminous does a block_size granularity freelist, and assumes that 0~ROUND_UP_TO(SUPER_RESERVED,block_size) is used. Current master uses min_alloc_size granularity and changes that assumption to 0~ROUND_UP_TO(SUPER_RESERVED,min_alloc_size). That means if master fsck's a luminous-created bluestore, it will think 0x2000~2000 is used (current baked-in min_alloc_size-based assumption) but the old freelist says it is free (old mkfs assumption). The disparity is harmless since the extent is below min_alloc_size, so ignore it. Fixes: http://tracker.ceph.com/issues/21408 Signed-off-by: Sage Weil (cherry picked from commit 4959ad310a96208565b47c035ab5d5dded1b8ff5) --- diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc index 3785efc2f285..94f4ca094fc8 100644 --- a/src/os/bluestore/BlueStore.cc +++ b/src/os/bluestore/BlueStore.cc @@ -6001,10 +6001,22 @@ int BlueStore::fsck(bool deep) } ); if (intersects) { - derr << __func__ << " error: free extent 0x" << std::hex << offset - << "~" << length << std::dec - << " intersects allocated blocks" << dendl; - ++errors; + if (offset == SUPER_RESERVED && + length == min_alloc_size - SUPER_RESERVED) { + // this is due to the change just after luminous to min_alloc_size + // granularity allocations, and our baked in assumption at the top + // of _fsck that 0~ROUND_UP_TO(SUPER_RESERVED,min_alloc_size) is used + // (vs luminous's ROUND_UP_TO(SUPER_RESERVED,block_size)). harmless, + // since we will never allocate this region below min_alloc_size. + dout(10) << __func__ << " ignoring free extent between SUPER_RESERVED" + << " and min_alloc_size, 0x" << std::hex << offset << "~" + << length << dendl; + } else { + derr << "fsck error: free extent 0x" << std::hex << offset + << "~" << length << std::dec + << " intersects allocated blocks" << dendl; + ++errors; + } } } fm->enumerate_reset();