summaryrefslogtreecommitdiffstats
path: root/mdadm.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-03-13 16:55:38 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-03-13 16:55:38 +0000
commit3f93672fea235de9cdedbf1cc440f09b3cfab3e8 (patch)
tree00cd571f505c85d946c225252fbb4373eb23d741 /mdadm.c
parentAdding upstream version 4.2+20230304. (diff)
downloadmdadm-3f93672fea235de9cdedbf1cc440f09b3cfab3e8.tar.xz
mdadm-3f93672fea235de9cdedbf1cc440f09b3cfab3e8.zip
Adding upstream version 4.2+20230313.upstream/4.2+20230313
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mdadm.c')
-rw-r--r--mdadm.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/mdadm.c b/mdadm.c
index 57e8e6f..4685ad6 100644
--- a/mdadm.c
+++ b/mdadm.c
@@ -590,6 +590,10 @@ int main(int argc, char *argv[])
s.assume_clean = 1;
continue;
+ case O(CREATE, WriteZeroes):
+ s.write_zeroes = 1;
+ continue;
+
case O(GROW,'n'):
case O(CREATE,'n'):
case O(BUILD,'n'): /* number of raid disks */
@@ -1251,6 +1255,11 @@ int main(int argc, char *argv[])
}
}
+ if (s.write_zeroes && !s.assume_clean) {
+ pr_info("Disk zeroing requested, setting --assume-clean to skip resync\n");
+ s.assume_clean = 1;
+ }
+
if (!mode && devs_found) {
mode = MISC;
devmode = 'Q';