From: Igor Fedotov Date: Tue, 9 Feb 2021 15:16:09 +0000 (+0300) Subject: os/bluestore: fix using incomplete bluefs log when dumping it. X-Git-Tag: v16.2.6~18^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F43007%2Fhead;p=ceph.git 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) --- diff --git a/src/os/bluestore/BlueFS.cc b/src/os/bluestore/BlueFS.cc index 874c51ace7d3c..f322a9b11f3e6 100644 --- a/src/os/bluestore/BlueFS.cc +++ b/src/os/bluestore/BlueFS.cc @@ -1421,6 +1421,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; @@ -3300,6 +3303,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; }