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 <akupczyk@redhat.com>
This commit is contained in:
Adam Kupczyk 2021-12-15 09:59:55 +00:00
parent ae5c5b7655
commit 2292a4d85a

View File

@ -1595,6 +1595,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;