Re: [PATCH v4] mdadm: replace container level checking with inline
From: Coly Li <hidden>
Date: 2022-09-03 07:11:28
2022年9月2日 14:49,Kinga Tanska [off-list ref] 写道: To unify all containers checks in code, is_container() function is added and propagated. Signed-off-by: Kinga Tanska <redacted>
Acked-by: Coly Li <redacted> But this patch has a minor conflict with Mateusz’s “Manage: Block unsafe member failing” series, it is simply because your patch landed a bit late than Mateusz’s. I already rebased your patch in the mdadm-CI queue. After I finish to review all the pending patches, let’s see whether you should post a v6 version or I can post the rebased one for you. Thanks. Coly Li
quoted hunk ↗ jump to hunk
--- Assemble.c | 7 +++---- Create.c | 6 +++--- Grow.c | 6 +++--- Incremental.c | 4 ++-- mdadm.h | 14 ++++++++++++++ super-ddf.c | 6 +++--- super-intel.c | 4 ++-- super0.c | 2 +- super1.c | 2 +- sysfs.c | 2 +- 10 files changed, 33 insertions(+), 20 deletions(-)diff --git a/Assemble.c b/Assemble.c index 1dd82a8c..8b0af0c9 100644 --- a/Assemble.c +++ b/Assemble.c
[snipped]
quoted hunk ↗ jump to hunk
@@ -1809,7 +1808,7 @@ try_again:} #endif } - if (c->force && !clean && content->array.level != LEVEL_CONTAINER && + if (c->force && !clean && !is_container(content->array.level) && !enough(content->array.level, content->array.raid_disks, content->array.layout, clean, avail)) { change += st->ss->update_super(st, content, "force-array”,
The conflict is here, and the rebased change looks like this,
@@ -1807,7 +1806,7 @@ try_again: } #endif } - if (c->force && !clean && content->array.level != LEVEL_CONTAINER && + if (c->force && !clean && !is_container(content->array.level) && !enough(content->array.level, content->array.raid_disks, content->array.layout, clean, avail)) { change += st->ss->update_super(st, content, UOPT_SPEC_FORCE_ARRAY,