Skip to content

Commit db0c7da

Browse files
committed
os/bluestore: remove not used zone_adjustments
Signed-off-by: Pere Diaz Bou <[email protected]>
1 parent 067a93c commit db0c7da

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

src/os/bluestore/BlueStore.cc

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6883,7 +6883,7 @@ int BlueStore::_create_alloc()
68836883
return 0;
68846884
}
68856885

6886-
int BlueStore::_init_alloc(std::map<uint64_t, uint64_t> *zone_adjustments)
6886+
int BlueStore::_init_alloc()
68876887
{
68886888
int r = _create_alloc();
68896889
if (r < 0) {
@@ -6944,7 +6944,7 @@ int BlueStore::_init_alloc(std::map<uint64_t, uint64_t> *zone_adjustments)
69446944
return 0;
69456945
}
69466946

6947-
void BlueStore::_post_init_alloc(const std::map<uint64_t, uint64_t>& zone_adjustments)
6947+
void BlueStore::_post_init_alloc()
69486948
{
69496949
int r = 0;
69506950
if (fm->is_null_manager()) {
@@ -7367,10 +7367,6 @@ int BlueStore::_open_db_and_around(bool read_only, bool to_repair)
73677367
}
73687368
}
73697369

7370-
// SMR devices may require a freelist adjustment, but that can only happen after
7371-
// the db is read-write. we'll stash pending changes here.
7372-
std::map<uint64_t, uint64_t> zone_adjustments;
7373-
73747370
int r = _open_path();
73757371
if (r < 0)
73767372
return r;
@@ -7408,7 +7404,7 @@ int BlueStore::_open_db_and_around(bool read_only, bool to_repair)
74087404
if (r < 0)
74097405
goto out_db;
74107406

7411-
r = _init_alloc(&zone_adjustments);
7407+
r = _init_alloc();
74127408
if (r < 0)
74137409
goto out_fm;
74147410

@@ -7425,7 +7421,7 @@ int BlueStore::_open_db_and_around(bool read_only, bool to_repair)
74257421
}
74267422

74277423
if (!read_only) {
7428-
_post_init_alloc(zone_adjustments);
7424+
_post_init_alloc();
74297425
}
74307426

74317427
// when function is called in repair mode (to_repair=true) we skip db->open()/create()

src/os/bluestore/BlueStore.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2729,8 +2729,8 @@ class BlueStore : public ObjectStore,
27292729
void _close_fm();
27302730
int _write_out_fm_meta(uint64_t target_size);
27312731
int _create_alloc();
2732-
int _init_alloc(std::map<uint64_t, uint64_t> *zone_adjustments);
2733-
void _post_init_alloc(const std::map<uint64_t, uint64_t>& zone_adjustments);
2732+
int _init_alloc();
2733+
void _post_init_alloc();
27342734
void _close_alloc();
27352735
int _open_collections();
27362736
void _fsck_collections(int64_t* errors);

0 commit comments

Comments
 (0)