}
if (restore_allocator(alloc, &num, &bytes) == 0) {
dout(5) << __func__ << "::NCB::restore_allocator() completed successfully alloc=" << alloc << dendl;
+ if (before_expansion_bdev_size > 0 &&
+ before_expansion_bdev_size < bdev_label.size) {
+ // we grow the allocation range, must reflect it in the allocation file
+ alloc->init_add_free(before_expansion_bdev_size,
+ bdev_label.size - before_expansion_bdev_size);
+ need_to_destage_allocation_file = true;
+ }
} else {
// This must mean that we had an unplanned shutdown and didn't manage to destage the allocator
dout(0) << __func__ << "::NCB::restore_allocator() failed! Run Full Recovery from ONodes (might take a while) ..." << dendl;
return -ENOTRECOVERABLE;
}
}
- if (before_expansion_bdev_size > 0 &&
- before_expansion_bdev_size < bdev_label.size) {
- // we grow the allocation range, must reflect it in the allocation file
- alloc->init_add_free(before_expansion_bdev_size,
- bdev_label.size - before_expansion_bdev_size);
- need_to_destage_allocation_file = true;
- }
}
before_expansion_bdev_size = 0;