xfs_io: add RWF_DSYNC support to pwrite
PATCH 1/1 xfs_io: add RWF_DSYNC support to pwrite
From: Dave Chinner <[email protected]>
Enable testing write behaviour with the per-io RWF_DSYNC flag.
--- io/pwrite.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
io/pwrite.c +5 -1
@@ -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);
Signature · 1 line
2.16.1
Quoted 14 lines · Dave Chinner
From: Dave Chinner <[email protected]>
Enable testing write behaviour with the per-io
RWF_DSYNCflag.Signed-off-by Dave Chinner <[email protected]>--- io/pwrite.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)io/pwrite.c +0
-0
io/pwrite.c pwrite_help(void) · line 59
Quoted 4 lines
io/pwrite.c +1
-0@@ -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
Quoted 23 lines
io/pwrite.c +4
-1#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);
Quoted 10 lines · Eric Sandeen
Quoted 9 lines · Dave Chinner
From: Dave Chinner <[email protected]>
Enable testing write behaviour with the per-io
RWF_DSYNCflag.Signed-off-by Dave Chinner <[email protected]>--- io/pwrite.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
Quoted 12 lines
io/pwrite.c pwrite_help(void) · line 59
Quoted 9 lines
io/pwrite.c +1
-0@@ -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_iomanpage update and a pwrite_cmd.args (short help) update, please.
Sure, forgot about that.
-Dave.
Signature · 2 lines
Dave Chinner [email protected]
PATCH v2 1/1 xfs_io: add RWF_DSYNC support to pwrite
In reply to Dave ChinnerFrom: Dave Chinner <[email protected]>
Enable testing write behaviour with the per-io RWF_DSYNC flag.
---
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(-)
io/pwrite.c +6 -2
@@ -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;
man/man8/xfs_io.8 +8 -2
@@ -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.
Quoted 5 lines · Dave Chinner
From: Dave Chinner <[email protected]>
Enable testing write behaviour with the per-io
RWF_DSYNCflag.Signed-off-by Dave Chinner <[email protected]>
thanks for the update.
Quoted 81 lines
---
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(-)io/pwrite.c +6
-2@@ -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;man/man8/xfs_io.8 +8
-3@@ -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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html