diff options
author | Lukasz Florczak <lukasz.florczak@linux.intel.com> | 2022-06-15 14:28:39 +0200 |
---|---|---|
committer | Jes Sorensen <jsorensen@fb.com> | 2022-06-24 20:09:38 +0200 |
commit | 70f1ff4291b0388adca1f4c91918ce1175e8b360 (patch) | |
tree | c15f74eefd9c8477b7bf51b62068a0da90cae212 /super1.c | |
parent | imsm: block changing slots during creation (diff) | |
download | mdadm-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 'super1.c')
-rw-r--r-- | super1.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -1530,8 +1530,7 @@ static int update_super1(struct supertype *st, struct mdinfo *info, * So we reject a revert-reshape unless the * alignment is good. */ - if (__le32_to_cpu(sb->level) >= 4 && - __le32_to_cpu(sb->level) <= 6) { + if (is_level456(__le32_to_cpu(sb->level))) { reshape_sectors = __le64_to_cpu(sb->reshape_position); reshape_chunk = __le32_to_cpu(sb->new_chunk); |