From: WANG Guoqin Date: Thu, 21 Sep 2017 08:24:43 +0000 (+0800) Subject: ceph-bluestore-tool: check if bdev is empty on 'bluefs-bdev-expand' X-Git-Tag: v13.0.1~188^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=3e664bd5dd5fec48669e6e64328a1efc08cc76bd;p=ceph.git ceph-bluestore-tool: check if bdev is empty on 'bluefs-bdev-expand' Signed-off-by: WANG Guoqin --- diff --git a/src/os/bluestore/bluestore_tool.cc b/src/os/bluestore/bluestore_tool.cc index 23d595442080..ba2ff2a688aa 100644 --- a/src/os/bluestore/bluestore_tool.cc +++ b/src/os/bluestore/bluestore_tool.cc @@ -297,6 +297,7 @@ int main(int argc, char **argv) for (int devid : { BlueFS::BDEV_WAL, BlueFS::BDEV_DB }) { interval_set 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) {