]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
os/bluestore/bluefs: Add test that detects bluefs inconsistency
authorAdam Kupczyk <akupczyk@redhat.com>
Mon, 24 May 2021 12:27:05 +0000 (14:27 +0200)
committerAdam Kupczyk <akupczyk@redhat.com>
Fri, 10 Sep 2021 13:47:34 +0000 (13:47 +0000)
commitbe7c0a8061c016555067af4ac6477872c08f8b31
treec521204ff6f2197dbfb85f598897036644e225ed
parentbc8c846b36288ff7ac65005087b0dda0e4b857f4
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.

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