]> sourceware.org Git - lvm2.git/commitdiff
vg_validate: only reject min_recovery_rate in case max_recovery_rate is set and smaller
authorHeinz Mauelshagen <heinzm@redhat.com>
Wed, 27 Jul 2016 21:20:58 +0000 (23:20 +0200)
committerHeinz Mauelshagen <heinzm@redhat.com>
Wed, 27 Jul 2016 21:20:58 +0000 (23:20 +0200)
lib/metadata/merge.c

index 33aa421d7f0be799528316a64b6291d8614112cb..12c3829c771e1aed641e1ea84e07ecc7c6b7b1a8 100644 (file)
@@ -118,8 +118,9 @@ static void _check_raid_region_recovery(struct lv_segment *seg, int *error_count
                raid_seg_error("zero region_size");
        if (!is_power_of_2(seg->region_size))
                raid_seg_error_val("non power of 2 region size", seg->region_size);
-       /* min/max recovery rate may be zero but min may not be larger than max*/
-       if (seg->min_recovery_rate > seg->max_recovery_rate)
+       /* min/max recovery rate may be zero but min may not be larger than max if set */
+       if (seg->max_recovery_rate &&
+           seg->min_recovery_rate > seg->max_recovery_rate)
                raid_seg_error_val("min recovery larger than max recovery larger", seg->min_recovery_rate);
 }
 
This page took 0.040327 seconds and 5 git commands to generate.