f2fs_io: add OSYNC option

Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
Jaegeuk Kim 2020-08-13 18:11:22 -07:00
parent 2579fe8099
commit 334047bdca

View File

@ -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");