Skip to contentSkip to conversation

f2fs_io: fix wrong buffered/dio option

PATCH In review Jaegeuk Kim 2 participants 2 messages Jul 12, 2019 – Jul 17, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 f2fs_io: fix wrong buffered/dio option

---
 tools/f2fs_io/f2fs_io.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
tools/f2fs_io/f2fs_io.c +4 -4
index 91f8cf2..7fd4425 100644
@@ -194,9 +194,9 @@ static void do_write(int argc, char **argv, const struct cmd_desc *cmd)
 		exit(1);
 	}
 
-	if (!strcmp(argv[5], "buffered")) {
+	if (!strcmp(argv[5], "dio")) {
 		flags |= O_DIRECT;
-	} else if (strcmp(argv[5], "dio")) {
+	} else if (strcmp(argv[5], "buffered")) {
 		fputs("Wrong IO type\n\n", stderr);
 		exit(1);
 	}
@@ -263,9 +263,9 @@ static void do_read(int argc, char **argv, const struct cmd_desc *cmd)
 		exit(1);
 	}
 	count = atoi(argv[3]);
-	if (!strcmp(argv[4], "buffered")) {
+	if (!strcmp(argv[4], "dio")) {
 		flags |= O_DIRECT;
-	} else if (strcmp(argv[4], "dio")) {
+	} else if (strcmp(argv[4], "buffered")) {
 		fputs("Wrong IO type\n\n", stderr);
 		exit(1);
 	}
Signature · 8 lines
2.19.0.605.g01d371f741-goog



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