[RFC 1/2] aio-dio-write-verify: Add O_DSYNC option

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---
 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





[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux