From: Adam Kupczyk Date: Wed, 24 Nov 2021 17:55:05 +0000 (+0100) Subject: os/bluestore/bluefs: Sync BlueFS log with its allocation delta X-Git-Tag: v17.1.0~204^2~1 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=ae5c5b7655535887ef56c96af62a1bf99f4c1d13;p=ceph.git os/bluestore/bluefs: Sync BlueFS log with its allocation delta BlueFS log is the only file that we can append to. When we append to file we must take into consideration previously commited allocations, otherwise update will be miscalculated. Signed-off-by: Adam Kupczyk --- diff --git a/src/os/bluestore/BlueFS.cc b/src/os/bluestore/BlueFS.cc index ff0e684d5c907..f9ed06a9ebe11 100644 --- a/src/os/bluestore/BlueFS.cc +++ b/src/os/bluestore/BlueFS.cc @@ -927,6 +927,7 @@ int BlueFS::mount() log_writer = _create_writer(_get_file(1)); ceph_assert(log_writer->file->fnode.ino == 1); log_writer->pos = log_writer->file->fnode.size; + log_writer->file->fnode.reset_delta(); dout(10) << __func__ << " log write pos set to 0x" << std::hex << log_writer->pos << std::dec << dendl;