1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

lvm2app: fix cache percantage reporting

In lvm2app we were always returning dirty (copy%) value.
Return properly data & metadata usage values.
This commit is contained in:
Zdenek Kabelac 2016-09-09 14:25:53 +02:00
parent 4b22cd81e6
commit 9350aa7218
2 changed files with 3 additions and 2 deletions

View File

@ -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.

View File

@ -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;
}