From db0c7daede9f1adfef92e998903cff961208cc65 Mon Sep 17 00:00:00 2001 From: Pere Diaz Bou Date: Mon, 15 Jul 2024 11:29:09 +0200 Subject: [PATCH] os/bluestore: remove not used zone_adjustments Signed-off-by: Pere Diaz Bou --- src/os/bluestore/BlueStore.cc | 12 ++++-------- src/os/bluestore/BlueStore.h | 4 ++-- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc index 4ecc7cc3a06..54d2ff72e07 100644 --- a/src/os/bluestore/BlueStore.cc +++ b/src/os/bluestore/BlueStore.cc @@ -6883,7 +6883,7 @@ int BlueStore::_create_alloc() return 0; } -int BlueStore::_init_alloc(std::map *zone_adjustments) +int BlueStore::_init_alloc() { int r = _create_alloc(); if (r < 0) { @@ -6944,7 +6944,7 @@ int BlueStore::_init_alloc(std::map *zone_adjustments) return 0; } -void BlueStore::_post_init_alloc(const std::map& zone_adjustments) +void BlueStore::_post_init_alloc() { int r = 0; if (fm->is_null_manager()) { @@ -7367,10 +7367,6 @@ int BlueStore::_open_db_and_around(bool read_only, bool to_repair) } } - // SMR devices may require a freelist adjustment, but that can only happen after - // the db is read-write. we'll stash pending changes here. - std::map zone_adjustments; - int r = _open_path(); if (r < 0) return r; @@ -7408,7 +7404,7 @@ int BlueStore::_open_db_and_around(bool read_only, bool to_repair) if (r < 0) goto out_db; - r = _init_alloc(&zone_adjustments); + r = _init_alloc(); if (r < 0) goto out_fm; @@ -7425,7 +7421,7 @@ int BlueStore::_open_db_and_around(bool read_only, bool to_repair) } if (!read_only) { - _post_init_alloc(zone_adjustments); + _post_init_alloc(); } // when function is called in repair mode (to_repair=true) we skip db->open()/create() diff --git a/src/os/bluestore/BlueStore.h b/src/os/bluestore/BlueStore.h index f7eafe93a35..b3146db8b26 100644 --- a/src/os/bluestore/BlueStore.h +++ b/src/os/bluestore/BlueStore.h @@ -2729,8 +2729,8 @@ private: void _close_fm(); int _write_out_fm_meta(uint64_t target_size); int _create_alloc(); - int _init_alloc(std::map *zone_adjustments); - void _post_init_alloc(const std::map& zone_adjustments); + int _init_alloc(); + void _post_init_alloc(); void _close_alloc(); int _open_collections(); void _fsck_collections(int64_t* errors); -- 2.39.5