From c565b35da1158ffd21274f1477586460621f1561 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 1 Oct 2021 15:54:04 -0500 Subject: [PATCH] os/bluestore: drain transactions on cleaner zone finish Make sure all open transactions (the ones from the cleaner especially) get drained before we clear the device zone. Signed-off-by: Sage Weil --- src/os/bluestore/BlueStore.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc index 320909d6133..16b77bcdf18 100644 --- a/src/os/bluestore/BlueStore.cc +++ b/src/os/bluestore/BlueStore.cc @@ -13154,6 +13154,10 @@ void BlueStore::_zoned_clean_zone(uint64_t zone) return; } + // make sure transactions flush/drain/commit (and data is all rewritten + // safely elsewhere) before we blow away the cleaned zone + _osr_drain_all(); + // reset the device zone dout(10) << __func__ << " resetting zone 0x" << std::hex << zone << std::dec << dendl; bdev->reset_zone(zone); -- 2.39.5