From b502381f4a6499c6fe031ab3c97542ff7fb686fa Mon Sep 17 00:00:00 2001 From: Igor Fedotov Date: Tue, 9 Feb 2021 18:16:09 +0300 Subject: [PATCH] os/bluestore: fix using incomplete bluefs log when dumping it. BlueFS superblock might contain incomplete list of physical extents for bluefs log. Hence we should alway replay ops for ino 1 to get them properly. Fixes: https://tracker.ceph.com/issues/52311 Signed-off-by: Igor Fedotov (cherry picked from commit 47632fe9baf7f20921c3e6888e29c4478fa5ff2d) --- src/os/bluestore/BlueFS.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/os/bluestore/BlueFS.cc b/src/os/bluestore/BlueFS.cc index bc6d34012bcbf..f27fe678c67b8 100644 --- a/src/os/bluestore/BlueFS.cc +++ b/src/os/bluestore/BlueFS.cc @@ -1589,6 +1589,9 @@ int BlueFS::_replay(bool noop, bool to_stdout) return r; } } + } else if (noop && fnode.ino == 1) { + FileRef f = _get_file(fnode.ino); + f->fnode = fnode; } } break; @@ -3522,6 +3525,10 @@ void BlueFS::_close_writer(FileWriter *h) } } } + // sanity + if (h->file->fnode.size >= (1ull << 30)) { + dout(10) << __func__ << " file is unexpectedly large:" << h->file->fnode << dendl; + } delete h; } -- 2.39.5