Commit 6ee0bae9 authored by Heinz Mauelshagen's avatar Heinz Mauelshagen Committed by Mike Snitzer

dm raid: enhance comments in takeover checks

Signed-off-by: default avatarHeinz Mauelshagen <heinzm@redhat.com>
Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
parent ae3c6cff
...@@ -1610,7 +1610,7 @@ static int rs_check_takeover(struct raid_set *rs) ...@@ -1610,7 +1610,7 @@ static int rs_check_takeover(struct raid_set *rs)
mddev->raid_disks == 2) mddev->raid_disks == 2)
return 0; return 0;
/* raid5 with parity N -> raid6 with parity N */ /* raid5_* -> raid6_*_6 with Q-Syndrome N (e.g. raid5_ra -> raid6_ra_6 */
if (mddev->new_level == 6 && if (mddev->new_level == 6 &&
((mddev->layout == ALGORITHM_PARITY_N && mddev->new_layout == ALGORITHM_PARITY_N) || ((mddev->layout == ALGORITHM_PARITY_N && mddev->new_layout == ALGORITHM_PARITY_N) ||
__within_range(mddev->new_layout, ALGORITHM_LEFT_ASYMMETRIC_6, ALGORITHM_RIGHT_SYMMETRIC_6))) __within_range(mddev->new_layout, ALGORITHM_LEFT_ASYMMETRIC_6, ALGORITHM_RIGHT_SYMMETRIC_6)))
...@@ -1628,7 +1628,7 @@ static int rs_check_takeover(struct raid_set *rs) ...@@ -1628,7 +1628,7 @@ static int rs_check_takeover(struct raid_set *rs)
mddev->layout == ALGORITHM_PARITY_N) mddev->layout == ALGORITHM_PARITY_N)
return 0; return 0;
/* raid6_*_n with parity N -> raid5_* */ /* raid6_*_n with Q-Syndrome N -> raid5_* */
if (mddev->new_level == 5 && if (mddev->new_level == 5 &&
((mddev->layout == ALGORITHM_PARITY_N && mddev->new_layout == ALGORITHM_PARITY_N) || ((mddev->layout == ALGORITHM_PARITY_N && mddev->new_layout == ALGORITHM_PARITY_N) ||
__within_range(mddev->new_layout, ALGORITHM_LEFT_ASYMMETRIC, ALGORITHM_RIGHT_SYMMETRIC))) __within_range(mddev->new_layout, ALGORITHM_LEFT_ASYMMETRIC, ALGORITHM_RIGHT_SYMMETRIC)))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment