From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Xiao Yang <yangx.jy@cn.fujitsu.com>
Cc: linux-xfs@vger.kernel.org
Subject: Re: [PATCH] xfs_io: Document '-q' option for pread/pwrite command
Date: Tue, 14 Jul 2020 08:01:48 -0700 [thread overview]
Message-ID: <20200714150148.GA7606@magnolia> (raw)
In-Reply-To: <20200714055327.1396-1-yangx.jy@cn.fujitsu.com>
On Tue, Jul 14, 2020 at 01:53:26PM +0800, Xiao Yang wrote:
> Signed-off-by: Xiao Yang <yangx.jy@cn.fujitsu.com>
I did not know we had a 'q' flag...
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
--D
> ---
> io/pread.c | 3 ++-
> io/pwrite.c | 3 ++-
> man/man8/xfs_io.8 | 10 ++++++++--
> 3 files changed, 12 insertions(+), 4 deletions(-)
>
> diff --git a/io/pread.c b/io/pread.c
> index 971dbbc9..458a78b8 100644
> --- a/io/pread.c
> +++ b/io/pread.c
> @@ -30,6 +30,7 @@ pread_help(void)
> " The reads are performed in sequential blocks starting at offset, with the\n"
> " blocksize tunable using the -b option (default blocksize is 4096 bytes),\n"
> " unless a different pattern is requested.\n"
> +" -q -- quiet mode, do not write anything to standard output.\n"
> " -B -- read backwards through the range from offset (backwards N bytes)\n"
> " -F -- read forwards through the range of bytes from offset (default)\n"
> " -v -- be verbose, dump out buffers (used when reading forwards)\n"
> @@ -506,7 +507,7 @@ pread_init(void)
> pread_cmd.argmin = 2;
> pread_cmd.argmax = -1;
> pread_cmd.flags = CMD_NOMAP_OK | CMD_FOREIGN_OK;
> - pread_cmd.args = _("[-b bs] [-v] [-i N] [-FBR [-Z N]] off len");
> + pread_cmd.args = _("[-b bs] [-qv] [-i N] [-FBR [-Z N]] off len");
> pread_cmd.oneline = _("reads a number of bytes at a specified offset");
> pread_cmd.help = pread_help;
>
> diff --git a/io/pwrite.c b/io/pwrite.c
> index 995f6ece..467bfa9f 100644
> --- a/io/pwrite.c
> +++ b/io/pwrite.c
> @@ -27,6 +27,7 @@ pwrite_help(void)
> " The writes are performed in sequential blocks starting at offset, with the\n"
> " blocksize tunable using the -b option (default blocksize is 4096 bytes),\n"
> " unless a different write pattern is requested.\n"
> +" -q -- quiet mode, do not write anything to standard output.\n"
> " -S -- use an alternate seed number for filling the write buffer\n"
> " -i -- input file, source of data to write (used when writing forward)\n"
> " -d -- open the input file for direct IO\n"
> @@ -483,7 +484,7 @@ pwrite_init(void)
> pwrite_cmd.argmax = -1;
> pwrite_cmd.flags = CMD_NOMAP_OK | CMD_FOREIGN_OK;
> pwrite_cmd.args =
> -_("[-i infile [-dDwNOW] [-s skip]] [-b bs] [-S seed] [-FBR [-Z N]] [-V N] off len");
> +_("[-i infile [-qdDwNOW] [-s skip]] [-b bs] [-S seed] [-FBR [-Z N]] [-V N] off len");
> pwrite_cmd.oneline =
> _("writes a number of bytes at a specified offset");
> pwrite_cmd.help = pwrite_help;
> diff --git a/man/man8/xfs_io.8 b/man/man8/xfs_io.8
> index b9dcc312..d3eb3e7e 100644
> --- a/man/man8/xfs_io.8
> +++ b/man/man8/xfs_io.8
> @@ -200,7 +200,7 @@ option will set the file permissions to read-write (0644). This allows xfs_io to
> set up mismatches between the file permissions and the open file descriptor
> read/write mode to exercise permission checks inside various syscalls.
> .TP
> -.BI "pread [ \-b " bsize " ] [ \-v ] [ \-FBR [ \-Z " seed " ] ] [ \-V " vectors " ] " "offset length"
> +.BI "pread [ \-b " bsize " ] [ \-qv ] [ \-FBR [ \-Z " seed " ] ] [ \-V " vectors " ] " "offset length"
> Reads a range of bytes in a specified blocksize from the given
> .IR offset .
> .RS 1.0i
> @@ -211,6 +211,9 @@ can be used to set the blocksize into which the
> .BR read (2)
> requests will be split. The default blocksize is 4096 bytes.
> .TP
> +.B \-q
> +quiet mode, do not write anything to standard output.
> +.TP
> .B \-v
> dump the contents of the buffer after reading,
> by default only the count of bytes actually read is dumped.
> @@ -241,7 +244,7 @@ See the
> .B pread
> command.
> .TP
> -.BI "pwrite [ \-i " file " ] [ \-dDwNOW ] [ \-s " skip " ] [ \-b " size " ] [ \-S " seed " ] [ \-FBR [ \-Z " zeed " ] ] [ \-V " vectors " ] " "offset length"
> +.BI "pwrite [ \-i " file " ] [ \-qdDwNOW ] [ \-s " skip " ] [ \-b " size " ] [ \-S " seed " ] [ \-FBR [ \-Z " zeed " ] ] [ \-V " vectors " ] " "offset length"
> Writes a range of bytes in a specified blocksize from the given
> .IR offset .
> The bytes written can be either a set pattern or read in from another
> @@ -254,6 +257,9 @@ allows an input
> .I file
> to be specified as the source of the data to be written.
> .TP
> +.B \-q
> +quiet mode, do not write anything to standard output.
> +.TP
> .B \-d
> causes direct I/O, rather than the usual buffered
> I/O, to be used when reading the input file.
> --
> 2.21.0
>
>
>
next prev parent reply other threads:[~2020-07-14 15:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-14 5:53 [PATCH] xfs_io: Document '-q' option for pread/pwrite command Xiao Yang
2020-07-14 15:01 ` Darrick J. Wong [this message]
2020-07-14 18:08 ` Eric Sandeen
2020-07-22 3:46 ` Xiao Yang
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=20200714150148.GA7606@magnolia \
--to=darrick.wong@oracle.com \
--cc=linux-xfs@vger.kernel.org \
--cc=yangx.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox