diff options
author | Kinga Tanska <kinga.tanska@intel.com> | 2022-08-19 02:55:46 +0200 |
---|---|---|
committer | Jes Sorensen <jsorensen@fb.com> | 2022-08-24 12:00:32 -0400 |
commit | 5c3c3df646dd3b7e8df81152f08e9ac4ddccc671 (patch) | |
tree | 304a92cd84b8fa901062082a1aed538c2a51cb62 | |
parent | 7211116c295ba1f9e1fcbdc2dd2d3762855062e1 (diff) | |
download | mdadm-test-5c3c3df646dd3b7e8df81152f08e9ac4ddccc671.tar.gz |
Assemble: check if device is container before scheduling force-clean update
Up to now using assemble with force flag making each array as clean.
Force-clean should not be done for the container. This commit add
check if device is different than container before cleaning.
Signed-off-by: Kinga Tanska <kinga.tanska@intel.com>
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
-rw-r--r-- | Assemble.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -1809,10 +1809,9 @@ try_again: } #endif } - if (c->force && !clean && + if (c->force && !clean && content->array.level != LEVEL_CONTAINER && !enough(content->array.level, content->array.raid_disks, - content->array.layout, clean, - avail)) { + content->array.layout, clean, avail)) { change += st->ss->update_super(st, content, "force-array", devices[chosen_drive].devname, c->verbose, 0, NULL); |