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

raid: lvcreate and lvchange fail if --min_recovery_rate is defined

Fix typos in previous commit 3589e515d.

Both commands default [raid_](min|max)recoveryrate to 0 but ensure
min_recovery_rate is not larger than max_recoveryrate.  This results
in command failure without requesting the user to also define
max_recovery_rate >= min_recovery_rate.

Fix both commands by defining max_recovery_rate = min_recoveryrate
in case "lvcreate/lvchange --minrecoveryrate Size ..." requests a
larger value than current maxrecoveryrate without also giving option
This commit is contained in:
Heinz Mauelshagen 2023-11-21 14:17:57 +01:00
parent 3589e515dc
commit f4edd87ffc

View File

@ -596,7 +596,7 @@ static int _read_raid_params(struct cmd_context *cmd,
if (lp->min_recovery_rate > lp->max_recovery_rate) {
log_print_unless_silent("Minimum recovery rate cannot be higher than maximum, adjusting.");
lp->max_recovery_rate > lp->min_recovery_rate;
lp->max_recovery_rate = lp->min_recovery_rate;
}
if (lp->region_size < lp->stripe_size) {