]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
os/bluestore/bluefs: Remove possibility of bluefs replay log containing files without... 43135/head
authorAdam Kupczyk <akupczyk@redhat.com>
Mon, 24 May 2021 12:49:51 +0000 (14:49 +0200)
committerAdam Kupczyk <akupczyk@redhat.com>
Fri, 10 Sep 2021 14:03:44 +0000 (14:03 +0000)
commit57bfcc555bfe041be92eb806c82c26d4167973b7
tree49aaf2e987db56bcd1a71718f37f18de451de544
parentbe7c0a8061c016555067af4ac6477872c08f8b31
os/bluestore/bluefs: Remove possibility of bluefs replay log containing files without data

It had been possible to have a bluefs replay log to serialize file metadata (size, allocations),
but actual data stored in these allocations is not yet synced to disk.

This could happen if _flush_range(h1) allocated space for file h1 on device (like SLOW) that will not
be used when flushing future replay log. Such thing can happen when we have h2 that wrote to WAL and
out replay log is on DB. After fsync(h2) we write to replay log, wait for fdatasync on WAL and DB.
There is no waiting on SLOW, but h1 was dirty and has been serialized to replay log.

Solution is to delay notifying replay log that it has to include h1 after finishing fdatasync.

Cherry-picked from: 03ac53f7d4c83e56f664ad371ffe3bc2d40e1837
Fixes: https://tracker.ceph.com/issues/51129
Signed-off-by: Adam Kupczyk <akupczyk@redhat.com>
Conflicts:
src/os/bluestore/BlueFS.cc
src/os/bluestore/BlueRocksEnv.cc
src/os/bluestore/BlueFS.cc
src/os/bluestore/BlueFS.h
src/os/bluestore/BlueRocksEnv.cc