mirror of
https://github.com/ceph/ceph
synced 2025-01-01 08:32:24 +00:00
Merge PR #23516 into master
* refs/pull/23516/head: os/bluestore: check bluefs_extents consistency (DB vs. BlueFS) Reviewed-by: Sage Weil <sage@redhat.com>
This commit is contained in:
commit
4c2591b5d3
@ -6118,6 +6118,26 @@ int BlueStore::_fsck(bool deep, bool repair)
|
||||
}
|
||||
|
||||
if (bluefs) {
|
||||
interval_set<uint64_t> bset;
|
||||
r = bluefs->get_block_extents(bluefs_shared_bdev, &bset);
|
||||
assert(r == 0);
|
||||
if (!(bset == bluefs_extents)) {
|
||||
dout(10) << __func__ << " bluefs says 0x" << std::hex << bset << std::dec
|
||||
<< dendl;
|
||||
dout(10) << __func__ << " super says 0x" << std::hex << bluefs_extents
|
||||
<< std::dec << dendl;
|
||||
|
||||
interval_set<uint64_t> overlap;
|
||||
overlap.intersection_of(bset, bluefs_extents);
|
||||
|
||||
bset.subtract(overlap);
|
||||
if (!bset.empty()) {
|
||||
derr << "fsck error: bluefs extra 0x" << std::hex << bset << std::dec
|
||||
<< dendl;
|
||||
++errors;
|
||||
}
|
||||
}
|
||||
|
||||
for (auto e = bluefs_extents.begin(); e != bluefs_extents.end(); ++e) {
|
||||
apply(
|
||||
e.get_start(), e.get_len(), fm->get_alloc_size(), used_blocks,
|
||||
|
Loading…
Reference in New Issue
Block a user