mirror of
git://sourceware.org/git/lvm2.git
synced 2025-03-11 20:58:50 +03:00
report: fix report copy_percent value
When mirror/raid called copy_percent function to return, when 100% was supposed to be returned, wrong float 100.0 value could have been reported back instead of dm_percent_t DM_PERCENT_100. There is broken API somewhere, since the function here rely on actively being modifid VG content even when doing 'lvs' operation. (extents_copies)
This commit is contained in:
parent
780424639a
commit
e9ee2cb6b6
@ -1,5 +1,6 @@
|
|||||||
Version 2.02.155 -
|
Version 2.02.155 -
|
||||||
================================
|
================================
|
||||||
|
Correcting value in copy_percent() for 100%.
|
||||||
Update vgreduce to use process_each_vg.
|
Update vgreduce to use process_each_vg.
|
||||||
Update lvconvert to use process_each_lv.
|
Update lvconvert to use process_each_lv.
|
||||||
Update pvscan to use process_each_vg for autoactivation.
|
Update pvscan to use process_each_vg for autoactivation.
|
||||||
|
@ -872,7 +872,7 @@ dm_percent_t copy_percent(const struct logical_volume *lv)
|
|||||||
numerator += seg->area_len;
|
numerator += seg->area_len;
|
||||||
}
|
}
|
||||||
|
|
||||||
return denominator ? dm_make_percent(numerator, denominator) : 100.0;
|
return denominator ? dm_make_percent(numerator, denominator) : DM_PERCENT_100;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Round up extents to next stripe boundary for number of stripes */
|
/* Round up extents to next stripe boundary for number of stripes */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user