From ae5c5b7655535887ef56c96af62a1bf99f4c1d13 Mon Sep 17 00:00:00 2001 From: Adam Kupczyk Date: Wed, 24 Nov 2021 18:55:05 +0100 Subject: [PATCH] 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 --- src/os/bluestore/BlueFS.cc | 1 + 1 file changed, 1 insertion(+) 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; -- 2.39.5