Skip to content

Commit

Permalink
Merge pull request ceph#60323 from aclamk/wip-aclamk-fix-68528
Browse files Browse the repository at this point in the history
os/bluestore: Fix repair of multilabel when collides with BlueFS
  • Loading branch information
aclamk authored Oct 18, 2024
2 parents 8978b85 + 7343be7 commit 4b54215
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/os/bluestore/BlueStore.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6794,9 +6794,8 @@ void BlueStore::_main_bdev_label_try_reserve()
vector<uint64_t> candidate_positions;
vector<uint64_t> accepted_positions;
uint64_t lsize = std::max(BDEV_LABEL_BLOCK_SIZE, min_alloc_size);
for (size_t i = 1; i < bdev_label_positions.size(); i++) {
uint64_t location = bdev_label_positions[i];
if (location + lsize <= bdev->get_size()) {
for (uint64_t location : bdev_label_valid_locations) {
if (location != BDEV_FIRST_LABEL_POSITION) {
candidate_positions.push_back(location);
}
}
Expand Down Expand Up @@ -11497,9 +11496,7 @@ int BlueStore::_fsck_on_open(BlueStore::FSCKDepth depth, bool repair)
string p = path + "/block";
_write_bdev_label(cct, bdev, p, bdev_label, bdev_labels_in_repair);
for (uint64_t pos : bdev_labels_in_repair) {
if (pos != BDEV_FIRST_LABEL_POSITION) {
bdev_label_valid_locations.push_back(pos);
}
bdev_label_valid_locations.push_back(pos);
}
repaired += bdev_labels_in_repair.size();
}
Expand Down

0 comments on commit 4b54215

Please sign in to comment.