From: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
To: Logan Gunthorpe <logang@deltatee.com>
Cc: linux-raid@vger.kernel.org, Jes Sorensen <jes@trained-monkey.org>,
Guoqing Jiang <guoqing.jiang@linux.dev>, Xiao Ni <xni@redhat.com>,
Coly Li <colyli@suse.de>,
Chaitanya Kulkarni <chaitanyak@nvidia.com>,
Jonmichael Hands <jm@chia.net>,
Stephen Bates <sbates@raithlin.com>,
Martin Oliveira <Martin.Oliveira@eideticom.com>,
David Sloan <David.Sloan@eideticom.com>
Subject: Re: [PATCH mdadm v3 5/7] mdadm: Add --write-zeros option for Create
Date: Fri, 23 Sep 2022 13:20:06 +0200 [thread overview]
Message-ID: <20220923132006.000006ce@linux.intel.com> (raw)
In-Reply-To: <20220921204356.4336-6-logang@deltatee.com>
Hi Logan,
One comment from my side.
Thanks,
Mariusz
On Wed, 21 Sep 2022 14:43:54 -0600
Logan Gunthorpe <logang@deltatee.com> wrote:
> 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>
>
> fixup! mdadm: Add --write-zeros option for Create
> ---
> diff --git a/mdadm.h b/mdadm.h
> index 1ab31564efef..c7e00195d8c8 100644
> --- a/mdadm.h
> +++ b/mdadm.h
> @@ -273,6 +273,9 @@ static inline void __put_unaligned32(__u32 val, void *p)
>
> #define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0]))
>
> +#define KIB_TO_BYTES(x) ((x) << 10)
> +#define SEC_TO_BYTES(x) ((x) << 9)
> +
> extern const char Name[];
>
> struct md_bb_entry {
> @@ -387,6 +390,8 @@ struct mdinfo {
> ARRAY_UNKNOWN_STATE,
> } array_state;
> struct md_bb bb;
> +
> + pid_t zero_pid;
> };
mdinfo is used for raid properties. It is used for both system (sysfs_read())
and metadata(getinfo_super()). zero_pid property doesn't fit well there, it is
used once during creation. Could you please add it to mddev_dev struct or add
it to local array /list?
next prev parent reply other threads:[~2022-09-23 11:20 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-21 20:43 [PATCH mdadm v3 0/7] Write Zeroes option for Creating Arrays Logan Gunthorpe
2022-09-21 20:43 ` [PATCH mdadm v3 1/7] Create: goto abort_locked instead of return 1 in error path Logan Gunthorpe
2022-09-21 20:43 ` [PATCH mdadm v3 2/7] Create: remove safe_mode_delay local variable Logan Gunthorpe
2022-09-21 20:43 ` [PATCH mdadm v3 3/7] Create: Factor out add_disks() helpers Logan Gunthorpe
2022-09-21 20:43 ` [PATCH mdadm v3 4/7] mdadm: Introduce pr_info() Logan Gunthorpe
2022-09-21 20:43 ` [PATCH mdadm v3 5/7] mdadm: Add --write-zeros option for Create Logan Gunthorpe
2022-09-23 11:20 ` Mariusz Tkaczyk [this message]
2022-09-30 5:23 ` Xiao Ni
2022-09-30 15:39 ` Logan Gunthorpe
2022-09-21 20:43 ` [PATCH mdadm v3 6/7] tests/00raid5-zero: Introduce test to exercise --write-zeros Logan Gunthorpe
2022-09-21 20:43 ` [PATCH mdadm v3 7/7] manpage: Add --write-zeroes option to manpage Logan Gunthorpe
2022-09-30 5:26 ` [PATCH mdadm v3 0/7] Write Zeroes option for Creating Arrays Xiao Ni
2022-09-30 15:39 ` Logan Gunthorpe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220923132006.000006ce@linux.intel.com \
--to=mariusz.tkaczyk@linux.intel.com \
--cc=David.Sloan@eideticom.com \
--cc=Martin.Oliveira@eideticom.com \
--cc=chaitanyak@nvidia.com \
--cc=colyli@suse.de \
--cc=guoqing.jiang@linux.dev \
--cc=jes@trained-monkey.org \
--cc=jm@chia.net \
--cc=linux-raid@vger.kernel.org \
--cc=logang@deltatee.com \
--cc=sbates@raithlin.com \
--cc=xni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.