From: "Michael Kerrisk (man-pages)" <mtk.manpages@gmail.com>
To: Yang Xu <xuyang2018.jy@cn.fujitsu.com>, linux-man@vger.kernel.org
Cc: mtk.manpages@gmail.com
Subject: Re: [PATCH v2 3/3] loop.4: Document loop_configure ioctl
Date: Wed, 9 Sep 2020 11:17:52 +0200 [thread overview]
Message-ID: <5102fd63-a2e0-7bad-e8ef-e310acd65394@gmail.com> (raw)
In-Reply-To: <1596707314-2361-3-git-send-email-xuyang2018.jy@cn.fujitsu.com>
Hello Yang Xu,
On 8/6/20 11:48 AM, Yang Xu wrote:
> Signed-off-by: Yang Xu <xuyang2018.jy@cn.fujitsu.com>
> ---
> man4/loop.4 | 35 +++++++++++++++++++++++++++++++++++
> 1 file changed, 35 insertions(+)
>
> diff --git a/man4/loop.4 b/man4/loop.4
> index 41abe0122..44dfd9a8c 100644
> --- a/man4/loop.4
> +++ b/man4/loop.4
> @@ -181,6 +181,41 @@ This value must be a power of two in the range
> otherwise, an
> .B EINVAL
> error results.
> +.TP
> +.BR LOOP_CONFIGURE " (since Linux 5.8)"
> +.\" commit 3448914e8cc550ba792d4ccc74471d1ca4293aae
> +Setup and configure all loop device parameters using the (third)
> +.BR ioctl (2)
> +argument at once.
I suggest rewording as
[[
Setup and configure all loop device parameters in a single step using
the (third)
.BR ioctl (2)
argument.
]]
> +This argument is a pointer to
s/to/to a/
> +.I loop_config
> +structure, defined in
> +.I <linux/loop.h>
> +as:
> +.IP
> +.in +4n
> +.EX
> +struct loop_config {
> + __u32 fd;
> + __u32 block_size;
> + struct loop_info64 info;
> + __u64 __reserved[8];
> +};
> +.EE
> +.in
> +.IP
> +In addition to doing what
> +.BR LOOP_SET_STATUS
> +can do,
> +.BR LOOP_CONFIGURE
> +can also be used to set the correct block size immediately
> +by setting loop_config.block_size. Explicitly request
> +direct I/O mode by setting
> +.BR LO_FLAGS_DIRECT_IO
> +in loop_config.info.lo_flags. Explicitly request read-only
> +mode by setting
> +.BR LO_FLAGS_READ_ONLY
> +in loop_config.info.lo_flags.
On an earlier version of this patch, I commented that this piece is
unclear (the language is difficult to understand). If I correctly
guess what you are trying to say, then I think it would be better
worded as something like:
[[
In addition to doing what
.BR LOOP_SET_STATUS
can do,
.BR LOOP_CONFIGURE
can also be used to the following:
.IP * 2
Set the correct block size immediately by setting
.IR loop_config.block_size ;
.IP *
explicitly request direct I/O mode by setting
.BR LO_FLAGS_DIRECT_IO
in loop_config.info.lo_flags;
.IP *
explicitly request read-only mode by setting
.BR LO_FLAGS_READ_ONLY
in
.IR loop_config.info.lo_flags .
]]
In other words, I think you mean to say that LOOP_CONFIGURE can be used
to any one of the things in the list, right?
If I'm right, could you redraft the patch please. If I'm not right, I
think we better discuss some more how the text should look :-).
Thanks,
Michael
--
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
next prev parent reply other threads:[~2020-09-09 9:17 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-06 9:48 [PATCH v2 1/3] loop.4: Document LO_FLAGS_DIRECT_IO flag Yang Xu
2020-08-06 9:48 ` [PATCH v2 2/3] loop.4: add some details about lo_flag Yang Xu
2020-08-07 7:36 ` AW: " Walter Harms
2020-08-10 6:53 ` Yang Xu
2020-08-10 7:39 ` AW: " Walter Harms
2020-09-08 9:55 ` Yang Xu
2020-09-09 9:06 ` Michael Kerrisk (man-pages)
2020-09-09 11:17 ` Yang Xu
2020-08-06 9:48 ` [PATCH v2 3/3] loop.4: Document loop_configure ioctl Yang Xu
2020-09-09 9:17 ` Michael Kerrisk (man-pages) [this message]
2020-09-09 11:20 ` Yang Xu
2020-09-09 9:06 ` [PATCH v2 1/3] loop.4: Document LO_FLAGS_DIRECT_IO flag Michael Kerrisk (man-pages)
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=5102fd63-a2e0-7bad-e8ef-e310acd65394@gmail.com \
--to=mtk.manpages@gmail.com \
--cc=linux-man@vger.kernel.org \
--cc=xuyang2018.jy@cn.fujitsu.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.