]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
os/bluestore/bluefs: Add test that detects bluefs inconsistency 42424/head
authorAdam Kupczyk <akupczyk@redhat.com>
Mon, 24 May 2021 12:27:05 +0000 (14:27 +0200)
committerIgor Fedotov <ifed@suse.com>
Tue, 20 Jul 2021 16:57:01 +0000 (19:57 +0300)
commitd4c33220825f16525dd035f91d81ddf0708cf5ad
tree0f3a005a5afbbf1f6bbdd7eeb355950dd17f7393
parentd438f5e743747f2c3d73528d592e1498a705cb76
os/bluestore/bluefs: Add test that detects bluefs inconsistency

Add test that detects possible scenario that will cause BlueFS to have file
that contains data that has never been written. This is done by tricking
replay log to already accept file metadata (size, allocations), but actual data
stored in these allocations is not yet synced to disk.

Scenario:
1) write to file h1 on SLOW device
2) flush h1 (and trigger h1 mark to be added to bluefs replay log)
3) write to file h2
4) fsync h2 (forces replay log to be written)

The result is:
- bluefs log now has stable state of h1
- SLOW device is not yet flushed (no fdatasync())

Test detects this condition and fails.

Signed-off-by: Adam Kupczyk <akupczyk@redhat.com>
(cherry picked from commit c591a6e14e2c956d268adcaa9aa3e9c8a1fdea2a)
src/os/bluestore/BlueFS.cc
src/os/bluestore/BlueFS.h
src/test/objectstore/test_bluefs.cc