mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs-tools.git
synced 2024-11-23 09:43:34 +08:00
f2fs_io: add dsync option for write
This adds a write option having O_DIRECT | O_DSYNC. Reviewed-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
parent
a7b8b468ad
commit
9d0cb9e712
@ -76,6 +76,9 @@ buffered I/O
|
||||
.TP
|
||||
.B dio
|
||||
direct I/O
|
||||
.TP
|
||||
.B dsync
|
||||
direct I/O with O_DSYNC
|
||||
.RE
|
||||
.TP
|
||||
\fBread\fR \fI[chunk_size in 4kb] [offset in chunk_size] [count] [IO] [print_nbytes] [file_path]\fR
|
||||
|
@ -508,7 +508,8 @@ static void do_erase(int argc, char **argv, const struct cmd_desc *cmd)
|
||||
" rand : random numbers\n" \
|
||||
"IO can be\n" \
|
||||
" buffered : buffered IO\n" \
|
||||
" dio : direct IO\n" \
|
||||
" dio : O_DIRECT\n" \
|
||||
" dsync : O_DIRECT | O_DSYNC\n" \
|
||||
" osync : O_SYNC\n" \
|
||||
" atomic_commit : atomic write & commit\n" \
|
||||
" atomic_abort : atomic write & abort\n" \
|
||||
@ -552,6 +553,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], "dsync"))
|
||||
flags |= O_DIRECT | O_DSYNC;
|
||||
else if (!strcmp(argv[5], "osync"))
|
||||
flags |= O_SYNC;
|
||||
else if (!strcmp(argv[5], "atomic_commit"))
|
||||
|
Loading…
Reference in New Issue
Block a user