]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: avoid casting zoned implementations again
authorSage Weil <sage@newdream.net>
Mon, 18 Oct 2021 19:23:20 +0000 (14:23 -0500)
committerSage Weil <sage@newdream.net>
Fri, 29 Oct 2021 13:56:43 +0000 (09:56 -0400)
Signed-off-by: Sage Weil <sage@newdream.net>
src/os/bluestore/BlueStore.cc
src/os/bluestore/BlueStore.h

index 16b77bcdf18f95947b7edebbd2f274b546ffba90..a6293e3abcd58bdec9e8f722ff6ce9ffcb2e01b8 100644 (file)
@@ -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<ZonedAllocator*>(alloc);
-  auto f = dynamic_cast<ZonedFreelistManager*>(fm);
 
   KeyValueDB::Iterator it = db->get_iterator(PREFIX_ZONED_CL_INFO);
   std::string zone_start;
index f9e1b31d613a1f76856a6bee30d0ea0a866926ab..f3d16d1ace374402e67459e0d8e5fa27cf9d5455 100644 (file)
@@ -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