From: Sage Weil Date: Fri, 1 Oct 2021 20:54:04 +0000 (-0500) Subject: os/bluestore: drain transactions on cleaner zone finish X-Git-Tag: v17.1.0~535^2~9 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c565b35da1158ffd21274f1477586460621f1561;p=ceph.git 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 --- diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc index 320909d6133a..16b77bcdf18f 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);