]> git.apps.os.sepia.ceph.com Git - ceph-ci.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)
committerYite Gu <yitegu0@gmail.com>
Wed, 7 Aug 2024 02:46:19 +0000 (10:46 +0800)
commitcf861523cf42f034ce4f0b128cc48e100d1bf486
treeca0f08c73ca63181b6b408896afdff0ca6e31530
parenta776b6e9250808be7b8d4ac945352ad0ffe09791
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>
(cherry picked from commit 3aa891dbf6dafd3b1983fbe2efcbfd1d11d52b40)
src/blk/BlockDevice.h
src/blk/kernel/KernelDevice.cc
src/blk/kernel/KernelDevice.h
src/os/bluestore/BlueStore.cc