mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
lvm2api: fix data percent reporting for thin, snap
Use same logic for lvm2api as we use lvs reporting. data_percent is meant to be superset for snap_percent.
This commit is contained in:
parent
9efd3fb604
commit
1da6c1495a
@ -1,5 +1,6 @@
|
||||
Version 2.02.98 -
|
||||
=================================
|
||||
Fix lvm2api data_percent reporting for thin volumes.
|
||||
Do not allow RAID LVs in a clustered volume group.
|
||||
Update lvconvert to support stacking of devs for thin meta/data devs.
|
||||
Support changes of permissions for thin snapshot volumes.
|
||||
|
@ -104,6 +104,12 @@ static percent_t _data_percent(const struct logical_volume *lv)
|
||||
{
|
||||
percent_t perc;
|
||||
|
||||
if (lv_is_cow(lv))
|
||||
return _snap_percent(lv);
|
||||
|
||||
if (lv_is_thin_volume(lv))
|
||||
return lv_thin_percent(lv, 0, &perc) ? perc : PERCENT_INVALID;
|
||||
|
||||
return lv_thin_pool_percent(lv, 0, &perc) ? perc : PERCENT_INVALID;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user