]> git.ipfire.org Git - thirdparty/mdadm.git/commit - Create.c
mdadm: Add --write-zeros option for Create
authorLogan Gunthorpe <logang@deltatee.com>
Wed, 1 Mar 2023 20:41:33 +0000 (13:41 -0700)
committerJes Sorensen <jes@trained-monkey.org>
Mon, 13 Mar 2023 14:08:10 +0000 (10:08 -0400)
commit577fd10486d8d1472a6b559066f344ac30a3a391
tree9e51a7f670c3288138d38a06c588a4d8a4e0a98d
parent9364dbfb264e89ab9467dfc0d2b813033e320640
mdadm: Add --write-zeros option for Create

Add the --write-zeros option for Create which will send a write zeros
request to all the disks before assembling the array. After zeroing
the array, the disks will be in a known clean state and the initial
sync may be skipped.

Writing zeroes is best used when there is a hardware offload method
to zero the data. But even still, zeroing can take several minutes on
a large device. Because of this, all disks are zeroed in parallel using
their own forked process and a message is printed to the user. The main
process will proceed only after all the zeroing processes have completed
successfully.

Signed-off-by: Logan Gunthorpe <logang@deltatee.com>
Acked-by: Kinga Tanska <kinga.tanska@linux.intel.com>
Reviewed-by: Xiao Ni <xni@redhat.com>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Acked-by: Coly Li <colyli@suse.de>
Signed-off-by: Jes Sorensen <jes@trained-monkey.org>
Create.c
ReadMe.c
mdadm.c
mdadm.h