os/bluestore_tool: print actual usage in BlueFS::dump_block_extents.

Hence we can see per-device bluefs usage from ceph-bluestore-tool.
Signed-off-by: Igor Fedotov <ifedotov@suse.com>
This commit is contained in:
Igor Fedotov 2018-06-21 21:44:21 +03:00
parent ebaa80690d
commit f22a953f26

View File

@ -288,8 +288,13 @@ void BlueFS::dump_block_extents(ostream& out)
if (!bdev[i]) {
continue;
}
out << i << " : size 0x" << std::hex << bdev[i]->get_size()
<< " : own 0x" << block_all[i] << std::dec << "\n";
auto owned = get_total(i);
auto free = get_free(i);
out << i << " : device size 0x" << std::hex << bdev[i]->get_size()
<< " : own 0x" << block_all[i]
<< " = 0x" << owned
<< " : using 0x" << owned - free
<< std::dec << "\n";
}
}