]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
os/bluestore/bluefs: Fix sync compaction
authorAdam Kupczyk <akupczyk@redhat.com>
Thu, 3 Mar 2022 14:39:00 +0000 (15:39 +0100)
committerGabriel BenHanokh <benhanokh@gmail.com>
Mon, 7 Mar 2022 15:42:40 +0000 (17:42 +0200)
commit4fd98ce0359d6c3a36f08a3d87a78c3f0b65018d
treee295317968812d61fa435b9c93e79ad8688dba5c
parent9b2a64a5f6ea743b2a4f4c2dbd703248d88b2a96
os/bluestore/bluefs: Fix sync compaction

Fixes problem with sync compaction (_rewrite_log_and_layout_sync).
There was a problem with not updating log_seq after compacting log.

It cause to stop _replay log right after first transaction.

... 20 bluefs _replay 0x0:  op_dir_create sharding
... 20 bluefs _replay 0x0:  op_dir_link  sharding/def to 21
... 20 bluefs _replay 0x0:  op_jump_seq 1025
... 10 bluefs _read h 0x555557c46400 0x1000~1000 from file(ino 1 size 0x1000 mtime 0.000000 allocated 410000 alloc_commit 410000 extents [1:0x1540000~410000])
... 20 bluefs _read left 0xff000 len 0x1000
... 20 bluefs _read got 4096
... 10 bluefs _replay 0x1000: stop: seq 1025 != expected 1026

This is a product of bluefs fine grain locks refactor.

Signed-off-by: Adam Kupczyk <akupczyk@redhat.com>
(cherry picked from commit 2f8e37064ca079c960929d7bb91e84fbf7f5cd47)

Conflicts:
src/test/objectstore/test_bluefs.cc
src/os/bluestore/BlueFS.cc