Skip to content

Commit

Permalink
ceph-bluestore-tool: check if bdev is empty on 'bluefs-bdev-expand'
Browse files Browse the repository at this point in the history
Signed-off-by: WANG Guoqin <wangguoqin1001@gmail.com>
  • Loading branch information
wangguoqin1001 committed Sep 21, 2017
1 parent 998bf1b commit 3e664bd
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/os/bluestore/bluestore_tool.cc
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,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) {
Expand Down

0 comments on commit 3e664bd

Please sign in to comment.