@@ -6684,10 +6684,8 @@ int BlueStore::_read_bdev_label(
66846684 decode(expected_crc, p);
66856685 }
66866686 catch (ceph::buffer::error& e) {
6687- derr << __func__ << " unable to decode label " << path.c_str()
6688- << " at offset " << p.get_off()
6689- << ": " << e.what()
6690- << dendl;
6687+ derr << __func__ << " " << path.c_str() << " data at " << std::hex << disk_position
6688+ << std::dec << ", " << "unable to decode label " << dendl;
66916689 return -ENOENT;
66926690 }
66936691 if (crc != expected_crc) {
@@ -8974,6 +8972,15 @@ int BlueStore::expand_devices(ostream& out)
89748972 << " : size label updated to " << size
89758973 << std::endl;
89768974 }
8975+ if (bdev_label_multi) {
8976+ uint64_t lsize = std::max(BDEV_LABEL_BLOCK_SIZE, min_alloc_size);
8977+ for (uint64_t loc : bdev_label_positions) {
8978+ if ((loc >= size0) && (loc + lsize <= size)) {
8979+ bdev_label_valid_locations.push_back(loc);
8980+ }
8981+ }
8982+ _write_bdev_label(cct, bdev, path + "/block", bdev_label, bdev_label_valid_locations);
8983+ }
89778984 }
89788985 _close_db_and_around();
89798986
@@ -8988,15 +8995,6 @@ int BlueStore::expand_devices(ostream& out)
89888995 if (fm && fm->is_null_manager()) {
89898996 // we grow the allocation range, must reflect it in the allocation file
89908997 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- }
90008998 need_to_destage_allocation_file = true;
90018999 }
90029000 umount();
0 commit comments