]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
BlueStore: Fix a bug when FSCK is invoked in mount()/umount()/mkfs() with DEEP option 43870/head
authorGabriel BenHanokh <benhanokh@gmail.com>
Mon, 8 Nov 2021 17:12:40 +0000 (19:12 +0200)
committerGabriel BenHanokh <benhanokh@gmail.com>
Sat, 4 Dec 2021 21:59:39 +0000 (23:59 +0200)
commitcc87bef99eb92f216e9282cad8d7e764e7a1c960
tree6a496fabf52b3f17d9787e6e43a720f68321e5d6
parenta3b02a64f7fc3784f8dec7dac9e64b3a0bf72b17
BlueStore: Fix a bug when FSCK is invoked in mount()/umount()/mkfs() with DEEP option
Fixes: https://tracker.ceph.com/issues/53185
NCB mishandles fsck DEEP in mount()/umount()/mkfs() case causing it to remove the allocation-file without destaging a new copy (which will cost us a full rebuild on startup)
There are also few confiliting calls to open_db()/close_db() passing inconsistent read-only flag

We fix both issues by storing open-db type (read-only/read-write) and using it for close-db (which won't pass read-only flag anymore)
We also move allocation-file destage to close-db so it will be refreshed after being removed by fsck and such

Signed-off-by: Gabriel Benhanokh <gbenhano@redhat.com>
src/os/bluestore/BlueStore.cc
src/os/bluestore/BlueStore.h