mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
report: call snapshot percent with cow only
Ensure lv_snapshot_percent is used only with snapshot LVs.
This commit is contained in:
parent
5b07bd3f91
commit
ff13206c7e
@ -1,5 +1,6 @@
|
|||||||
Version 2.02.98 -
|
Version 2.02.98 -
|
||||||
=================================
|
=================================
|
||||||
|
Report invalid percentage for property snap_percent of non-snaphot LVs.
|
||||||
Disallow convertion of thins to mirrors.
|
Disallow convertion of thins to mirrors.
|
||||||
Fix lvm2api data_percent reporting for thin volumes.
|
Fix lvm2api data_percent reporting for thin volumes.
|
||||||
Do not allow RAID LVs in a clustered volume group.
|
Do not allow RAID LVs in a clustered volume group.
|
||||||
|
@ -95,8 +95,10 @@ static percent_t _copy_percent(const struct logical_volume *lv) {
|
|||||||
|
|
||||||
static percent_t _snap_percent(const struct logical_volume *lv) {
|
static percent_t _snap_percent(const struct logical_volume *lv) {
|
||||||
percent_t perc;
|
percent_t perc;
|
||||||
if (!lv_snapshot_percent(lv, &perc))
|
|
||||||
|
if (!lv_is_cow(lv) || !lv_snapshot_percent(lv, &perc))
|
||||||
perc = PERCENT_INVALID;
|
perc = PERCENT_INVALID;
|
||||||
|
|
||||||
return perc;
|
return perc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user