Merge pull request #17874 from ShowingCloud/master

ceph-bluestore-tool: check if bdev is empty on 'bluefs-bdev-expand'

Reviewed-by: Sage Weil <sage@redhat.com>
This commit is contained in:
Sage Weil 2017-11-17 08:51:07 -06:00 committed by GitHub
commit 4c19f6f2da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -471,6 +471,7 @@ int main(int argc, char **argv)
for (int devid : { BlueFS::BDEV_WAL, BlueFS::BDEV_DB }) {
interval_set<uint64_t> before;
fs->get_block_extents(devid, &before);
if (before.empty()) continue;
uint64_t end = before.range_end();
uint64_t size = fs->get_block_device_size(devid);
if (end < size) {