From: Sage Weil Date: Mon, 18 Oct 2021 19:23:20 +0000 (-0500) Subject: os/bluestore: avoid casting zoned implementations again X-Git-Tag: v17.1.0~535^2~6 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=ff2fe48548a6a454e68bacec61e217a050d6c7a8;p=ceph-ci.git os/bluestore: avoid casting zoned implementations again Signed-off-by: Sage Weil --- diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc index 16b77bcdf18..a6293e3abcd 100644 --- a/src/os/bluestore/BlueStore.cc +++ b/src/os/bluestore/BlueStore.cc @@ -13109,7 +13109,7 @@ void BlueStore::_zoned_cleaner_thread() } else { l.unlock(); a->set_cleaning_zone(zone_to_clean); - _zoned_clean_zone(zone_to_clean); + _zoned_clean_zone(zone_to_clean, a, f); a->clear_cleaning_zone(zone_to_clean); l.lock(); } @@ -13118,11 +13118,13 @@ void BlueStore::_zoned_cleaner_thread() zoned_cleaner_started = false; } -void BlueStore::_zoned_clean_zone(uint64_t zone) +void BlueStore::_zoned_clean_zone( + uint64_t zone, + ZonedAllocator *a, + ZonedFreelistManager *f + ) { dout(10) << __func__ << " cleaning zone 0x" << std::hex << zone << std::dec << dendl; - auto a = dynamic_cast(alloc); - auto f = dynamic_cast(fm); KeyValueDB::Iterator it = db->get_iterator(PREFIX_ZONED_CL_INFO); std::string zone_start; diff --git a/src/os/bluestore/BlueStore.h b/src/os/bluestore/BlueStore.h index f9e1b31d613..f3d16d1ace3 100644 --- a/src/os/bluestore/BlueStore.h +++ b/src/os/bluestore/BlueStore.h @@ -2479,7 +2479,9 @@ private: void _zoned_cleaner_start(); void _zoned_cleaner_stop(); void _zoned_cleaner_thread(); - void _zoned_clean_zone(uint64_t zone_num); + void _zoned_clean_zone(uint64_t zone_num, + class ZonedAllocator *a, + class ZonedFreelistManager *f); void _clean_some(ghobject_t oid, uint32_t zone_num); #endif