Linux-XFS Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] xfs_io: Document '-q' option for sendfile command
@ 2020-07-22  5:15 Xiao Yang
  2020-07-24 18:24 ` Eric Sandeen
  0 siblings, 1 reply; 2+ messages in thread
From: Xiao Yang @ 2020-07-22  5:15 UTC (permalink / raw)
  To: sandeen, darrick.wong; +Cc: linux-xfs, Xiao Yang

Signed-off-by: Xiao Yang <yangx.jy@cn.fujitsu.com>
---
 io/sendfile.c     | 3 ++-
 man/man8/xfs_io.8 | 6 +++++-
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/io/sendfile.c b/io/sendfile.c
index ff012c81..a003bb55 100644
--- a/io/sendfile.c
+++ b/io/sendfile.c
@@ -25,6 +25,7 @@ sendfile_help(void)
 " Copies data between one file descriptor and another.  Because this copying\n"
 " is done within the kernel, sendfile does not need to transfer data to and\n"
 " from user space.\n"
+" -q -- quiet mode, do not write anything to standard output.\n"
 " -f -- specifies an input file from which to source data to write\n"
 " -i -- specifies an input file name from which to source data to write.\n"
 " An offset and length in the source file can be optionally specified.\n"
@@ -168,7 +169,7 @@ sendfile_init(void)
 	sendfile_cmd.argmax = -1;
 	sendfile_cmd.flags = CMD_NOMAP_OK | CMD_FOREIGN_OK;
 	sendfile_cmd.args =
-		_("-i infile | -f N [off len]");
+		_("[-q] -i infile | -f N [off len]");
 	sendfile_cmd.oneline =
 		_("Transfer data directly between file descriptors");
 	sendfile_cmd.help = sendfile_help;
diff --git a/man/man8/xfs_io.8 b/man/man8/xfs_io.8
index d3eb3e7e..caf3f15c 100644
--- a/man/man8/xfs_io.8
+++ b/man/man8/xfs_io.8
@@ -541,13 +541,17 @@ manual page to allocate and zero blocks within the range.
 Truncates the current file at the given offset using
 .BR ftruncate (2).
 .TP
-.BI "sendfile \-i " srcfile " | \-f " N " [ " "offset length " ]
+.BI "sendfile [ \-q ] \-i " srcfile " | \-f " N " [ " "offset length " ]
 On platforms which support it, allows a direct in-kernel copy between
 two file descriptors. The current open file is the target, the source
 must be specified as another open file
 .RB ( \-f )
 or by path
 .RB ( \-i ).
+.RS 1.0i
+.B \-q
+quiet mode, do not write anything to standard output.
+.RE
 .TP
 .BI "readdir [ -v ] [ -o " offset " ] [ -l " length " ] "
 Read a range of directory entries from a given offset of a directory.
-- 
2.21.0




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] xfs_io: Document '-q' option for sendfile command
  2020-07-22  5:15 [PATCH] xfs_io: Document '-q' option for sendfile command Xiao Yang
@ 2020-07-24 18:24 ` Eric Sandeen
  0 siblings, 0 replies; 2+ messages in thread
From: Eric Sandeen @ 2020-07-24 18:24 UTC (permalink / raw)
  To: Xiao Yang, darrick.wong; +Cc: linux-xfs

On 7/21/20 10:15 PM, Xiao Yang wrote:
> Signed-off-by: Xiao Yang <yangx.jy@cn.fujitsu.com>

Reviewed-by: Eric Sandeen <sandeen@redhat.com>

> ---
>  io/sendfile.c     | 3 ++-
>  man/man8/xfs_io.8 | 6 +++++-
>  2 files changed, 7 insertions(+), 2 deletions(-)
> 
> diff --git a/io/sendfile.c b/io/sendfile.c
> index ff012c81..a003bb55 100644
> --- a/io/sendfile.c
> +++ b/io/sendfile.c
> @@ -25,6 +25,7 @@ sendfile_help(void)
>  " Copies data between one file descriptor and another.  Because this copying\n"
>  " is done within the kernel, sendfile does not need to transfer data to and\n"
>  " from user space.\n"
> +" -q -- quiet mode, do not write anything to standard output.\n"
>  " -f -- specifies an input file from which to source data to write\n"
>  " -i -- specifies an input file name from which to source data to write.\n"
>  " An offset and length in the source file can be optionally specified.\n"
> @@ -168,7 +169,7 @@ sendfile_init(void)
>  	sendfile_cmd.argmax = -1;
>  	sendfile_cmd.flags = CMD_NOMAP_OK | CMD_FOREIGN_OK;
>  	sendfile_cmd.args =
> -		_("-i infile | -f N [off len]");
> +		_("[-q] -i infile | -f N [off len]");
>  	sendfile_cmd.oneline =
>  		_("Transfer data directly between file descriptors");
>  	sendfile_cmd.help = sendfile_help;
> diff --git a/man/man8/xfs_io.8 b/man/man8/xfs_io.8
> index d3eb3e7e..caf3f15c 100644
> --- a/man/man8/xfs_io.8
> +++ b/man/man8/xfs_io.8
> @@ -541,13 +541,17 @@ manual page to allocate and zero blocks within the range.
>  Truncates the current file at the given offset using
>  .BR ftruncate (2).
>  .TP
> -.BI "sendfile \-i " srcfile " | \-f " N " [ " "offset length " ]
> +.BI "sendfile [ \-q ] \-i " srcfile " | \-f " N " [ " "offset length " ]
>  On platforms which support it, allows a direct in-kernel copy between
>  two file descriptors. The current open file is the target, the source
>  must be specified as another open file
>  .RB ( \-f )
>  or by path
>  .RB ( \-i ).
> +.RS 1.0i
> +.B \-q
> +quiet mode, do not write anything to standard output.
> +.RE
>  .TP
>  .BI "readdir [ -v ] [ -o " offset " ] [ -l " length " ] "
>  Read a range of directory entries from a given offset of a directory.
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-22  5:15 [PATCH] xfs_io: Document '-q' option for sendfile command Xiao Yang
2020-07-24 18:24 ` Eric Sandeen

Linux-XFS Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-xfs/0 linux-xfs/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-xfs linux-xfs/ https://lore.kernel.org/linux-xfs \
		linux-xfs@vger.kernel.org
	public-inbox-index linux-xfs

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-xfs


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git