]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore/bluefs: Sync BlueFS log with its allocation delta
authorAdam Kupczyk <akupczyk@redhat.com>
Wed, 24 Nov 2021 17:55:05 +0000 (18:55 +0100)
committerAdam Kupczyk <akupczyk@redhat.com>
Mon, 20 Dec 2021 21:55:37 +0000 (21:55 +0000)
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 <akupczyk@redhat.com>
src/os/bluestore/BlueFS.cc

index ff0e684d5c907ae0b3dad67fdc4a2ad0ae84e93d..f9ed06a9ebe11ca7c3ad570cabeaabe7e17bf2e6 100644 (file)
@@ -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;