]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
os/bluestore: Fix deferred writes corrupting RocksDB 47297/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:02:54 +0000 (11:02 +0000)
commit4735b0a4215d754ead759bd1e7f1f309cfc72a75
tree1e334d3c5242bdc55ab7af3a73407f7b521d631f
parent0e43ea588652ff09e22515959ccbd2539b76151f
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