]> git.apps.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 17:02:06 +0000 (20:02 +0300)
commit4383c65c777889ae4344140654fded11615be201
treed87a6f4262dbefab224ae1bb862b64d7e8ffcda2
parent7d518f6b629e6292006e88108f6ca78edde2db67
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)

 Conflicts:
(trivial - additional future stuff src/os/bluestore/BlueFS.cc
src/os/bluestore/BlueFS.cc
src/os/bluestore/BlueFS.h
src/os/bluestore/BlueRocksEnv.cc