From 9350aa72184e08da0faa5f1fda2f245e6342a426 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Fri, 9 Sep 2016 14:25:53 +0200 Subject: [PATCH] lvm2app: fix cache percantage reporting In lvm2app we were always returning dirty (copy%) value. Return properly data & metadata usage values. --- WHATS_NEW | 1 + lib/report/properties.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/WHATS_NEW b/WHATS_NEW index 95848729d..2c47452a0 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.02.166 - ===================================== + Fix lvm2api reporting of cache data and metadata percent. Restore reporting of metadata usage for cache volumes (2.02.155). Support raid scrubbing on cache origin LV. diff --git a/lib/report/properties.c b/lib/report/properties.c index d3feb07fe..3b27bdc3f 100644 --- a/lib/report/properties.c +++ b/lib/report/properties.c @@ -114,7 +114,7 @@ static dm_percent_t _data_percent(const struct logical_volume *lv) stack; return DM_PERCENT_INVALID; } - percent = status->dirty_usage; + percent = status->data_usage; dm_pool_destroy(status->mem); return percent; } @@ -135,7 +135,7 @@ static dm_percent_t _metadata_percent(const struct logical_volume *lv) stack; return DM_PERCENT_INVALID; } - percent = status->dirty_usage; + percent = status->metadata_usage; dm_pool_destroy(status->mem); return percent; }