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

lvconvert: Fix --splitmirrors segfault with incorrect PV.

Commit 9ee071705b misunderstood integer
promotion, but it's simpler to detect -1 more directly.
This commit is contained in:
Alasdair G Kergon 2016-08-26 01:21:01 +01:00
parent fc93f10892
commit 2fde4399a0
2 changed files with 2 additions and 1 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.165 -
===================================
Give error not segfault in lvconvert --splitmirrors when PV lies outside LV.
Fix typo in report/columns_as_rows config option name recognition (2.02.99).
Avoid PV tags when checking allocation against parallel PVs.
Disallow mirror conversions of raid10 volumes.

View File

@ -1497,7 +1497,7 @@ int lv_raid_split_and_track(struct logical_volume *lv,
break;
}
if (s >= (int) seg->area_count) {
if (s < 0) {
log_error("Unable to find image to satisfy request");
return 0;
}