summaryrefslogtreecommitdiffstats
path: root/super0.c
diff options
context:
space:
mode:
authorLukasz Florczak <lukasz.florczak@linux.intel.com>2022-06-15 14:28:39 +0200
committerJes Sorensen <jsorensen@fb.com>2022-06-24 20:09:38 +0200
commit70f1ff4291b0388adca1f4c91918ce1175e8b360 (patch)
treec15f74eefd9c8477b7bf51b62068a0da90cae212 /super0.c
parentimsm: block changing slots during creation (diff)
downloadmdadm-70f1ff4291b0388adca1f4c91918ce1175e8b360.tar.xz
mdadm-70f1ff4291b0388adca1f4c91918ce1175e8b360.zip
mdadm: block update=ppl for non raid456 levels
Option ppl should be used only for raid levels 4, 5 and 6. Cancel update for other levels. Applied globally for imsm and ddf format. Additionally introduce is_level456() helper function. Signed-off-by: Lukasz Florczak <lukasz.florczak@linux.intel.com> Signed-off-by: Jes Sorensen <jsorensen@fb.com>
Diffstat (limited to 'super0.c')
-rw-r--r--super0.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/super0.c b/super0.c
index 61c9ec1d..37f595ed 100644
--- a/super0.c
+++ b/super0.c
@@ -683,7 +683,7 @@ static int update_super0(struct supertype *st, struct mdinfo *info,
int parity = sb->level == 6 ? 2 : 1;
rv = 0;
- if (sb->level >= 4 && sb->level <= 6 &&
+ if (is_level456(sb->level) &&
sb->reshape_position % (
sb->new_chunk/512 *
(sb->raid_disks - sb->delta_disks - parity))) {