From 38f67676e47ac9a88ebfdb1da7d349e4e6fb2d49 Mon Sep 17 00:00:00 2001 From: Seth Jennings Date: Mon, 7 Mar 2016 15:42:24 -0600 Subject: [PATCH] get stats in bytes --- thin-provisioning/thin_ls.cc | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/thin-provisioning/thin_ls.cc b/thin-provisioning/thin_ls.cc index 869c7cf..4e0b97d 100644 --- a/thin-provisioning/thin_ls.cc +++ b/thin-provisioning/thin_ls.cc @@ -109,6 +109,10 @@ namespace { EXCLUSIVE_SECTORS, SHARED_SECTORS, + MAPPED_BYTES, + EXCLUSIVE_BYTES, + SHARED_BYTES, + MAPPED, EXCLUSIVE, SHARED, @@ -128,6 +132,10 @@ namespace { "EXCLUSIVE_SECTORS", "SHARED_SECTORS", + "MAPPED_BYTES", + "EXCLUSIVE_BYTES", + "SHARED_BYTES", + "MAPPED", "EXCLUSIVE", "SHARED", @@ -298,6 +306,8 @@ namespace { *it == SHARED_BLOCKS || *it == EXCLUSIVE_SECTORS || *it == SHARED_SECTORS || + *it == EXCLUSIVE_BYTES || + *it == SHARED_BYTES || *it == EXCLUSIVE || *it == SHARED) return true; @@ -375,6 +385,20 @@ namespace { grid.field((it->second.mapped_blocks_ - exclusive) * block_size); break; + case MAPPED_BYTES: + grid.field(it->second.mapped_blocks_ * block_size * + disk_unit_multiplier(UNIT_SECTOR)); + break; + + case EXCLUSIVE_BYTES: + grid.field(exclusive * block_size * + disk_unit_multiplier(UNIT_SECTOR)); + break; + + case SHARED_BYTES: + grid.field((it->second.mapped_blocks_ - exclusive) * block_size * + disk_unit_multiplier(UNIT_SECTOR)); + break; case MAPPED: grid.field(