]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
os/bluestore: Fix deferred writes corrupting RocksDB 47296/head
authorAdam Kupczyk <akupczyk@redhat.com>
Wed, 29 Jun 2022 08:31:43 +0000 (10:31 +0200)
committerAdam Kupczyk <akupczyk@redhat.com>
Wed, 27 Jul 2022 11:35:03 +0000 (11:35 +0000)
commit1d0ae5c375f7223fee8cb82ecbef0761d1b0f085
tree1f1783ad5908411dd3b403d49c8bb003f2799035
parent122fa7eafec286d5126cc2955fd1436471dd23a3
os/bluestore: Fix deferred writes corrupting RocksDB

Deferred writes can sometimes update regions that are no longer mapped to any object.
This cannot happen when BlueStore is running, as blobs are being held,
and allocations are not released until deferred op is executed.
However in case of restart allocations that deferred is targetting are already freed.
Deferred replay is done on BlueStore bootup, before any new object can be allocated,
so no collision with object is possible.
But BlueFS can allocate space from block with deferred ops still pending.

Fixes: https://tracker.ceph.com/issues/54547
Signed-off-by: Adam Kupczyk <akupczyk@redhat.com>
(cherry picked from commit 2afb951a490aac9ca4d01614867396cbd06b793d)

Conflicts: src/os/bluestore/BlueStore.cc
Modified non-critical BlueFS call foreach_block_extents to get_block_extents.
src/os/bluestore/BlueStore.cc
src/os/bluestore/BlueStore.h