[thin-check] print out some info fields.

These are consumed by lvm.
This commit is contained in:
Joe Thornber
2018-11-09 12:43:21 +00:00
parent 5a309dd3bd
commit d1a41d01cc
2 changed files with 17 additions and 0 deletions

View File

@@ -195,6 +195,13 @@ namespace {
return fs.override_mapping_root ? *fs.override_mapping_root : sb.data_mapping_root_;
}
void print_info(superblock_detail::superblock const &sb,
transaction_manager::ptr tm)
{
cout << "TRANSACTION_ID=" << sb.trans_id_ << "\n";
cout << "METADATA_FREE_BLOCKS=" << tm->get_sm()->get_nr_free() << "\n";
}
error_state metadata_check(string const &path, flags fs) {
nested_output out(cerr, 2);
if (fs.quiet)
@@ -228,6 +235,9 @@ namespace {
transaction_manager::ptr tm =
open_tm(bm, superblock_detail::SUPERBLOCK_LOCATION);
if (!fs.quiet)
print_info(sb, tm);
if (fs.check_device_tree) {
out << "examining devices tree" << end_message();
{