From: Adam Kupczyk Date: Wed, 15 Dec 2021 09:59:55 +0000 (+0000) Subject: os/bluestore/bluefs: Add tracking of bluefs log in noop replay mode X-Git-Tag: v16.2.11~62^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a27a7c7358009aafad26079cfc1df3c6b30035c7;p=ceph.git os/bluestore/bluefs: Add tracking of bluefs log in noop replay mode Keep updating bluefs log when printing content of bluefs replay log. Without this modification we only have initial content of log. Log can be printed by 'ceph-bluestore-tool bluefs-log-dump'. Signed-off-by: Adam Kupczyk (cherry picked from commit 2292a4d85a6c26be69b3cda8ba885a0cb23b2224) --- diff --git a/src/os/bluestore/BlueFS.cc b/src/os/bluestore/BlueFS.cc index 76751b77160..9bf79ead050 100644 --- a/src/os/bluestore/BlueFS.cc +++ b/src/os/bluestore/BlueFS.cc @@ -1479,6 +1479,14 @@ int BlueFS::_replay(bool noop, bool to_stdout) return r; } } + } else if (noop && delta.ino == 1) { + // we need to track bluefs log, even in noop mode + FileRef f = _get_file(1); + bluefs_fnode_t& fnode = f->fnode; + fnode.ino = delta.ino; + fnode.mtime = delta.mtime; + fnode.size = delta.size; + fnode.claim_extents(delta.extents); } } break;