All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xfs_io: add RWF_DSYNC support to pwrite
@ 2018-03-01  1:36 Dave Chinner
  2018-03-02  3:45 ` Eric Sandeen
  2018-03-05  4:08 ` [PATCH V2] " Dave Chinner
  0 siblings, 2 replies; 5+ messages in thread
From: Dave Chinner @ 2018-03-01  1:36 UTC (permalink / raw)
  To: linux-xfs

From: Dave Chinner <dchinner@redhat.com>

Enable testing write behaviour with the per-io RWF_DSYNC flag.

Signed-Off-By: Dave Chinner <dchinner@redhat.com>
---
 io/pwrite.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/io/pwrite.c b/io/pwrite.c
index a89edfd0496f..58867b764635 100644
--- a/io/pwrite.c
+++ b/io/pwrite.c
@@ -56,6 +56,7 @@ pwrite_help(void)
 #endif
 #ifdef HAVE_PWRITEV2
 " -N   -- Perform the pwritev2() with RWF_NOWAIT\n"
+" -D   -- Perform the pwritev2() with RWF_DSYNC\n"
 #endif
 "\n"));
 }
@@ -299,7 +300,7 @@ pwrite_f(
 	init_cvtnum(&fsblocksize, &fssectsize);
 	bsize = fsblocksize;
 
-	while ((c = getopt(argc, argv, "b:BCdf:Fi:NqRs:OS:uV:wWZ:")) != EOF) {
+	while ((c = getopt(argc, argv, "b:BCdDf:Fi:NqRs:OS:uV:wWZ:")) != EOF) {
 		switch (c) {
 		case 'b':
 			tmp = cvtnum(fsblocksize, fssectsize, optarg);
@@ -335,6 +336,9 @@ pwrite_f(
 		case 'N':
 			pwritev2_flags |= RWF_NOWAIT;
 			break;
+		case 'D':
+			pwritev2_flags |= RWF_DSYNC;
+			break;
 #endif
 		case 's':
 			skip = cvtnum(fsblocksize, fssectsize, optarg);
-- 
2.16.1


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

* Re: [PATCH] xfs_io: add RWF_DSYNC support to pwrite
  2018-03-01  1:36 [PATCH] xfs_io: add RWF_DSYNC support to pwrite Dave Chinner
@ 2018-03-02  3:45 ` Eric Sandeen
  2018-03-02 21:49   ` Dave Chinner
  2018-03-05  4:08 ` [PATCH V2] " Dave Chinner
  1 sibling, 1 reply; 5+ messages in thread
From: Eric Sandeen @ 2018-03-02  3:45 UTC (permalink / raw)
  To: Dave Chinner, linux-xfs

On 2/28/18 7:36 PM, Dave Chinner wrote:
> From: Dave Chinner <dchinner@redhat.com>
> 
> Enable testing write behaviour with the per-io RWF_DSYNC flag.
> 
> Signed-Off-By: Dave Chinner <dchinner@redhat.com>
> ---
>  io/pwrite.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/io/pwrite.c b/io/pwrite.c
> index a89edfd0496f..58867b764635 100644
> --- a/io/pwrite.c
> +++ b/io/pwrite.c
> @@ -56,6 +56,7 @@ pwrite_help(void)
>  #endif
>  #ifdef HAVE_PWRITEV2
>  " -N   -- Perform the pwritev2() with RWF_NOWAIT\n"
> +" -D   -- Perform the pwritev2() with RWF_DSYNC\n"

Needs an xfs_io manpage update and a pwrite_cmd.args
(short help) update, please.

Thanks,
-Eric

>  #endif
>  "\n"));
>  }
> @@ -299,7 +300,7 @@ pwrite_f(
>  	init_cvtnum(&fsblocksize, &fssectsize);
>  	bsize = fsblocksize;
>  
> -	while ((c = getopt(argc, argv, "b:BCdf:Fi:NqRs:OS:uV:wWZ:")) != EOF) {
> +	while ((c = getopt(argc, argv, "b:BCdDf:Fi:NqRs:OS:uV:wWZ:")) != EOF) {
>  		switch (c) {
>  		case 'b':
>  			tmp = cvtnum(fsblocksize, fssectsize, optarg);
> @@ -335,6 +336,9 @@ pwrite_f(
>  		case 'N':
>  			pwritev2_flags |= RWF_NOWAIT;
>  			break;
> +		case 'D':
> +			pwritev2_flags |= RWF_DSYNC;
> +			break;
>  #endif
>  		case 's':
>  			skip = cvtnum(fsblocksize, fssectsize, optarg);
> 

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

* Re: [PATCH] xfs_io: add RWF_DSYNC support to pwrite
  2018-03-02  3:45 ` Eric Sandeen
@ 2018-03-02 21:49   ` Dave Chinner
  0 siblings, 0 replies; 5+ messages in thread
From: Dave Chinner @ 2018-03-02 21:49 UTC (permalink / raw)
  To: Eric Sandeen; +Cc: linux-xfs

On Thu, Mar 01, 2018 at 09:45:43PM -0600, Eric Sandeen wrote:
> On 2/28/18 7:36 PM, Dave Chinner wrote:
> > From: Dave Chinner <dchinner@redhat.com>
> > 
> > Enable testing write behaviour with the per-io RWF_DSYNC flag.
> > 
> > Signed-Off-By: Dave Chinner <dchinner@redhat.com>
> > ---
> >  io/pwrite.c | 6 +++++-
> >  1 file changed, 5 insertions(+), 1 deletion(-)
> > 
> > diff --git a/io/pwrite.c b/io/pwrite.c
> > index a89edfd0496f..58867b764635 100644
> > --- a/io/pwrite.c
> > +++ b/io/pwrite.c
> > @@ -56,6 +56,7 @@ pwrite_help(void)
> >  #endif
> >  #ifdef HAVE_PWRITEV2
> >  " -N   -- Perform the pwritev2() with RWF_NOWAIT\n"
> > +" -D   -- Perform the pwritev2() with RWF_DSYNC\n"
> 
> Needs an xfs_io manpage update and a pwrite_cmd.args
> (short help) update, please.

Sure, forgot about that.

-Dave.
-- 
Dave Chinner
david@fromorbit.com

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

* [PATCH V2] xfs_io: add RWF_DSYNC support to pwrite
  2018-03-01  1:36 [PATCH] xfs_io: add RWF_DSYNC support to pwrite Dave Chinner
  2018-03-02  3:45 ` Eric Sandeen
@ 2018-03-05  4:08 ` Dave Chinner
  2018-03-06 17:07   ` Eric Sandeen
  1 sibling, 1 reply; 5+ messages in thread
From: Dave Chinner @ 2018-03-05  4:08 UTC (permalink / raw)
  To: linux-xfs

From: Dave Chinner <dchinner@redhat.com>

Enable testing write behaviour with the per-io RWF_DSYNC flag.

Signed-Off-By: Dave Chinner <dchinner@redhat.com>
---

V2: updated shortform help string and added command to the man page.

 io/pwrite.c       |  8 ++++++--
 man/man8/xfs_io.8 | 10 ++++++++--
 2 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/io/pwrite.c b/io/pwrite.c
index a89edfd0496f..74cc5882fe4b 100644
--- a/io/pwrite.c
+++ b/io/pwrite.c
@@ -56,6 +56,7 @@ pwrite_help(void)
 #endif
 #ifdef HAVE_PWRITEV2
 " -N   -- Perform the pwritev2() with RWF_NOWAIT\n"
+" -D   -- Perform the pwritev2() with RWF_DSYNC\n"
 #endif
 "\n"));
 }
@@ -299,7 +300,7 @@ pwrite_f(
 	init_cvtnum(&fsblocksize, &fssectsize);
 	bsize = fsblocksize;
 
-	while ((c = getopt(argc, argv, "b:BCdf:Fi:NqRs:OS:uV:wWZ:")) != EOF) {
+	while ((c = getopt(argc, argv, "b:BCdDf:Fi:NqRs:OS:uV:wWZ:")) != EOF) {
 		switch (c) {
 		case 'b':
 			tmp = cvtnum(fsblocksize, fssectsize, optarg);
@@ -335,6 +336,9 @@ pwrite_f(
 		case 'N':
 			pwritev2_flags |= RWF_NOWAIT;
 			break;
+		case 'D':
+			pwritev2_flags |= RWF_DSYNC;
+			break;
 #endif
 		case 's':
 			skip = cvtnum(fsblocksize, fssectsize, optarg);
@@ -469,7 +473,7 @@ pwrite_init(void)
 	pwrite_cmd.argmax = -1;
 	pwrite_cmd.flags = CMD_NOMAP_OK | CMD_FOREIGN_OK;
 	pwrite_cmd.args =
-_("[-i infile [-dwNOW] [-s skip]] [-b bs] [-S seed] [-FBR [-Z N]] [-V N] off len");
+_("[-i infile [-dDwNOW] [-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 8bf3f57bd30e..ad9cf390b3c9 100644
--- a/man/man8/xfs_io.8
+++ b/man/man8/xfs_io.8
@@ -222,7 +222,7 @@ See the
 .B pread
 command.
 .TP
-.BI "pwrite [ \-i " file " ] [ \-dwNOW ] [ \-s " skip " ] [ \-b " size " ] [ \-S " seed " ] [ \-FBR [ \-Z " zeed " ] ] [ \-V " vectors " ] " "offset length"
+.BI "pwrite [ \-i " file " ] [ \-dDwNOW ] [ \-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
@@ -248,7 +248,13 @@ once all writes are complete (included in timing results)
 Perform the
 .BR pwritev2 (2)
 call with
-.I RWF_NOWAIT.
+.IR RWF_NOWAIT .
+.TP
+.B \-D
+Perform the
+.BR pwritev2 (2)
+call with
+.IR RWF_DSYNC .
 .TP
 .B \-O
 perform pwrite once and return the (maybe partial) bytes written.

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

* Re: [PATCH V2] xfs_io: add RWF_DSYNC support to pwrite
  2018-03-05  4:08 ` [PATCH V2] " Dave Chinner
@ 2018-03-06 17:07   ` Eric Sandeen
  0 siblings, 0 replies; 5+ messages in thread
From: Eric Sandeen @ 2018-03-06 17:07 UTC (permalink / raw)
  To: Dave Chinner, linux-xfs



On 3/4/18 10:08 PM, Dave Chinner wrote:
> From: Dave Chinner <dchinner@redhat.com>
> 
> Enable testing write behaviour with the per-io RWF_DSYNC flag.
> 
> Signed-Off-By: Dave Chinner <dchinner@redhat.com>


thanks for the update.

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

> ---
> 
> V2: updated shortform help string and added command to the man page.
> 
>  io/pwrite.c       |  8 ++++++--
>  man/man8/xfs_io.8 | 10 ++++++++--
>  2 files changed, 14 insertions(+), 4 deletions(-)
> 
> diff --git a/io/pwrite.c b/io/pwrite.c
> index a89edfd0496f..74cc5882fe4b 100644
> --- a/io/pwrite.c
> +++ b/io/pwrite.c
> @@ -56,6 +56,7 @@ pwrite_help(void)
>  #endif
>  #ifdef HAVE_PWRITEV2
>  " -N   -- Perform the pwritev2() with RWF_NOWAIT\n"
> +" -D   -- Perform the pwritev2() with RWF_DSYNC\n"
>  #endif
>  "\n"));
>  }
> @@ -299,7 +300,7 @@ pwrite_f(
>  	init_cvtnum(&fsblocksize, &fssectsize);
>  	bsize = fsblocksize;
>  
> -	while ((c = getopt(argc, argv, "b:BCdf:Fi:NqRs:OS:uV:wWZ:")) != EOF) {
> +	while ((c = getopt(argc, argv, "b:BCdDf:Fi:NqRs:OS:uV:wWZ:")) != EOF) {
>  		switch (c) {
>  		case 'b':
>  			tmp = cvtnum(fsblocksize, fssectsize, optarg);
> @@ -335,6 +336,9 @@ pwrite_f(
>  		case 'N':
>  			pwritev2_flags |= RWF_NOWAIT;
>  			break;
> +		case 'D':
> +			pwritev2_flags |= RWF_DSYNC;
> +			break;
>  #endif
>  		case 's':
>  			skip = cvtnum(fsblocksize, fssectsize, optarg);
> @@ -469,7 +473,7 @@ pwrite_init(void)
>  	pwrite_cmd.argmax = -1;
>  	pwrite_cmd.flags = CMD_NOMAP_OK | CMD_FOREIGN_OK;
>  	pwrite_cmd.args =
> -_("[-i infile [-dwNOW] [-s skip]] [-b bs] [-S seed] [-FBR [-Z N]] [-V N] off len");
> +_("[-i infile [-dDwNOW] [-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 8bf3f57bd30e..ad9cf390b3c9 100644
> --- a/man/man8/xfs_io.8
> +++ b/man/man8/xfs_io.8
> @@ -222,7 +222,7 @@ See the
>  .B pread
>  command.
>  .TP
> -.BI "pwrite [ \-i " file " ] [ \-dwNOW ] [ \-s " skip " ] [ \-b " size " ] [ \-S " seed " ] [ \-FBR [ \-Z " zeed " ] ] [ \-V " vectors " ] " "offset length"
> +.BI "pwrite [ \-i " file " ] [ \-dDwNOW ] [ \-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
> @@ -248,7 +248,13 @@ once all writes are complete (included in timing results)
>  Perform the
>  .BR pwritev2 (2)
>  call with
> -.I RWF_NOWAIT.
> +.IR RWF_NOWAIT .
> +.TP
> +.B \-D
> +Perform the
> +.BR pwritev2 (2)
> +call with
> +.IR RWF_DSYNC .
>  .TP
>  .B \-O
>  perform pwrite once and return the (maybe partial) bytes written.
> --
> To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

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

end of thread, other threads:[~2018-03-06 17:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-01  1:36 [PATCH] xfs_io: add RWF_DSYNC support to pwrite Dave Chinner
2018-03-02  3:45 ` Eric Sandeen
2018-03-02 21:49   ` Dave Chinner
2018-03-05  4:08 ` [PATCH V2] " Dave Chinner
2018-03-06 17:07   ` Eric Sandeen

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.