From be22364959900379c1736ca3e9cabf9346247d57 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 1 Nov 2016 12:34:59 -0400 Subject: [PATCH] os/bluestore: fsck: check for extents spanning shards Signed-off-by: Sage Weil --- src/os/bluestore/BlueStore.cc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc index 451e4bd06bee5..53e269696cef4 100644 --- a/src/os/bluestore/BlueStore.cc +++ b/src/os/bluestore/BlueStore.cc @@ -4377,7 +4377,14 @@ int BlueStore::fsck(bool deep) if (l.logical_offset < pos) { derr << __func__ << " " << oid << " lextent at 0x" << std::hex << l.logical_offset - << "overlaps with the previous, which ends at 0x" << pos + << " overlaps with the previous, which ends at 0x" << pos + << std::dec << dendl; + ++errors; + } + if (o->extent_map.spans_shard(l.logical_offset, l.length)) { + derr << __func__ << " " << oid << " lextent at 0x" + << std::hex << l.logical_offset << "~" << l.length + << " spans a shard boundary" << std::dec << dendl; ++errors; } -- 2.39.5