]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
os/bluestore/bluefs: Remove possibility of bluefs replay log containing files without...
authorAdam Kupczyk <akupczyk@redhat.com>
Mon, 24 May 2021 12:49:51 +0000 (14:49 +0200)
committerIgor Fedotov <ifed@suse.com>
Tue, 20 Jul 2021 16:56:52 +0000 (19:56 +0300)
commitd438f5e743747f2c3d73528d592e1498a705cb76
treeee185ebef79bcbf68c7eaea1886d13937ac6e6dc
parent7feddc9819ca05586f230accd67b4e26a328e618
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.

Fixes: https://tracker.ceph.com/issues/50965
Signed-off-by: Adam Kupczyk <akupczyk@redhat.com>
(cherry picked from commit 03ac53f7d4c83e56f664ad371ffe3bc2d40e1837)
src/os/bluestore/BlueFS.cc
src/os/bluestore/BlueFS.h
src/os/bluestore/BlueRocksEnv.cc