linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC 1/2] aio-dio-write-verify: Add O_DSYNC option
@ 2025-07-31 12:35 Ritesh Harjani (IBM)
  2025-07-31 12:35 ` [RFC 2/2] generic: Add integrity tests for O_DSYNC and RWF_DSYNC writes Ritesh Harjani (IBM)
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Ritesh Harjani (IBM) @ 2025-07-31 12:35 UTC (permalink / raw)
  To: fstests
  Cc: linux-fsdevel, Jan Kara, Darrick J . Wong, John Garry,
	Ritesh Harjani (IBM)

This patch adds -D for O_DSYNC open flag to aio-dio-write-verify test.
We will use this in later patch for integrity verification test with
aio-dio.

Signed-off-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com>
---
 src/aio-dio-regress/aio-dio-write-verify.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/aio-dio-regress/aio-dio-write-verify.c b/src/aio-dio-regress/aio-dio-write-verify.c
index 513a338b..0cf14a2a 100644
--- a/src/aio-dio-regress/aio-dio-write-verify.c
+++ b/src/aio-dio-regress/aio-dio-write-verify.c
@@ -40,6 +40,7 @@ void usage(char *progname)
 	        "\t\tsize=N: AIO write size\n"
 	        "\t\toff=M:  AIO write startoff\n"
 	        "\t-S: uses O_SYNC flag for open. By default O_SYNC is not used\n"
+	        "\t-D: uses O_DSYNC flag for open. By default O_DSYNC is not used\n"
 	        "\t-N: no_verify: means no write verification. By default noverify is false\n"
 	        "e.g: %s -t 4608 -a size=4096,off=512 -a size=4096,off=4608 filename\n"
 	        "e.g: %s -t 1048576 -a size=1048576 -S -N filename\n",
@@ -298,7 +299,7 @@ int main(int argc, char *argv[])
 	int o_sync = 0;
 	int no_verify = 0;
 
-	while ((c = getopt(argc, argv, "a:t:SN")) != -1) {
+	while ((c = getopt(argc, argv, "a:t:SND")) != -1) {
 		char *endp;
 
 		switch (c) {
@@ -316,6 +317,9 @@ int main(int argc, char *argv[])
 		case 'S':
 			o_sync = O_SYNC;
 			break;
+		case 'D':
+			o_sync = O_DSYNC;
+			break;
 		case 'N':
 			no_verify = 1;
 			break;
-- 
2.49.0


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

end of thread, other threads:[~2025-08-03  5:38 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-31 12:35 [RFC 1/2] aio-dio-write-verify: Add O_DSYNC option Ritesh Harjani (IBM)
2025-07-31 12:35 ` [RFC 2/2] generic: Add integrity tests for O_DSYNC and RWF_DSYNC writes Ritesh Harjani (IBM)
2025-08-01 20:18   ` Zorro Lang
2025-08-01 20:29     ` Ritesh Harjani
2025-08-02  8:17       ` Zorro Lang
2025-08-03  5:23         ` Ritesh Harjani
2025-07-31 15:00 ` [RFC 1/2] aio-dio-write-verify: Add O_DSYNC option Jan Kara
2025-08-02  8:18 ` Zorro Lang

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).