Skip to content

Commit 76978bc

Browse files
committed
os/bluestore: Fix CBT bluefs-bdev-expand
This is a fixup to original "Fix CBT bluefs-bdev-expand" commit. Somehow, the code was placed in wrong place. Re-Fixes: https://tracker.ceph.com/issues/68577 Signed-off-by: Adam Kupczyk <[email protected]>
1 parent 1fca955 commit 76978bc

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/os/bluestore/BlueStore.cc

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8974,6 +8974,15 @@ int BlueStore::expand_devices(ostream& out)
89748974
<< " : size label updated to " << size
89758975
<< std::endl;
89768976
}
8977+
if (bdev_label_multi) {
8978+
uint64_t lsize = std::max(BDEV_LABEL_BLOCK_SIZE, min_alloc_size);
8979+
for (uint64_t loc : bdev_label_positions) {
8980+
if ((loc >= size0) && (loc + lsize <= size)) {
8981+
bdev_label_valid_locations.push_back(loc);
8982+
}
8983+
}
8984+
_write_bdev_label(cct, bdev, path + "/block", bdev_label, bdev_label_valid_locations);
8985+
}
89778986
}
89788987
_close_db_and_around();
89798988

@@ -8988,15 +8997,6 @@ int BlueStore::expand_devices(ostream& out)
89888997
if (fm && fm->is_null_manager()) {
89898998
// we grow the allocation range, must reflect it in the allocation file
89908999
alloc->init_add_free(size0, size - size0);
8991-
if (bdev_label_multi) {
8992-
uint64_t lsize = std::max(BDEV_LABEL_BLOCK_SIZE, min_alloc_size);
8993-
for (uint64_t loc : bdev_label_positions) {
8994-
if ((loc >= size0) && (loc + lsize <= size)) {
8995-
bdev_label_valid_locations.push_back(loc);
8996-
}
8997-
}
8998-
_write_bdev_label(cct, bdev, path + "/block", bdev_label, bdev_label_valid_locations);
8999-
}
90009000
need_to_destage_allocation_file = true;
90019001
}
90029002
umount();

0 commit comments

Comments
 (0)