linux-xfs.vger.kernel.org archive mirror
 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

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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).