Skip to contentSkip to conversation

f2fs_io: add OSYNC option

PATCH In review Jaegeuk Kim 2 participants 2 messages Aug 14, 2020 – Aug 18, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 f2fs_io: add OSYNC option

---
 tools/f2fs_io/f2fs_io.c | 3 +++
 1 file changed, 3 insertions(+)
tools/f2fs_io/f2fs_io.c +3 -0
index abb655a..70a077a 100644
@@ -424,6 +424,7 @@ static void do_fallocate(int argc, char **argv, const struct cmd_desc *cmd)
 "IO can be\n"						\
 "  buffered : buffered IO\n"				\
 "  dio      : direct IO\n"				\
+"  osync    : O_SYNC\n"					\
 
 static void do_write(int argc, char **argv, const struct cmd_desc *cmd)
 {
@@ -460,6 +461,8 @@ static void do_write(int argc, char **argv, const struct cmd_desc *cmd)
 
 	if (!strcmp(argv[5], "dio"))
 		flags |= O_DIRECT;
+	else if (!strcmp(argv[5], "osync"))
+		flags |= O_SYNC;
 	else if (strcmp(argv[5], "buffered"))
 		die("Wrong IO type");
 
Signature · 8 lines
2.28.0.220.ged08abb693-goog



_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel