]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
os/BlueStore: NCB fix for leaked space when bdev_async_discard is enabled
authorGabriel BenHanokh <gbenhano@redhat.com>
Sun, 7 Apr 2024 10:57:14 +0000 (10:57 +0000)
committerGabriel BenHanokh <gbenhano@redhat.com>
Tue, 9 Apr 2024 12:17:22 +0000 (12:17 +0000)
commit3aa891dbf6dafd3b1983fbe2efcbfd1d11d52b40
tree4a4b9ffa41d282e2a7cdabc6a4efc956c2be6afe
parent344c1ff08d5a9f3bf0089fc6ffc295fe0c4dbdaf
os/BlueStore: NCB fix for leaked space when bdev_async_discard is enabled
Fix calls bdev->discard_drain() before calling store_allocator() to make sure all freed space is reflected in the allocator before destaging it
The fix set a timeout for the drain call (500msec) and if expires will not store the allocator (forcing a recovery on the next startup)
Fixes: https://tracker.ceph.com/issues/65298
Signed-off-by: Gabriel BenHanokh <gbenhano@redhat.com>
src/blk/BlockDevice.h
src/blk/kernel/KernelDevice.cc
src/blk/kernel/KernelDevice.h
src/os/bluestore/BlueStore.cc