linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: linux-xfs@vger.kernel.org
Subject: [PATCH] xfs_io: add RWF_DSYNC support to pwrite
Date: Thu,  1 Mar 2018 12:36:33 +1100	[thread overview]
Message-ID: <20180301013633.28364-1-david@fromorbit.com> (raw)

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


             reply	other threads:[~2018-03-01  1:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-01  1:36 Dave Chinner [this message]
2018-03-02  3:45 ` [PATCH] xfs_io: add RWF_DSYNC support to pwrite 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

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=20180301013633.28364-1-david@fromorbit.com \
    --to=david@fromorbit.com \
    --cc=linux-xfs@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).