Ensure lv_snapshot_percent is used only with snapshot LVs.
Version 2.02.98 -
=================================
+ Report invalid percentage for property snap_percent of non-snaphot LVs.
Disallow convertion of thins to mirrors.
Fix lvm2api data_percent reporting for thin volumes.
Do not allow RAID LVs in a clustered volume group.
static percent_t _snap_percent(const struct logical_volume *lv) {
percent_t perc;
- if (!lv_snapshot_percent(lv, &perc))
+
+ if (!lv_is_cow(lv) || !lv_snapshot_percent(lv, &perc))
perc = PERCENT_INVALID;
+
return perc;
}