@@ -54,7 +54,8 @@ going down with fsck mark
Get or set the pinning status on a file.
.TP
\fBfadvise\fR \fI[advice] [offset] [length] [file]\fR
-Pass an advice to the specified file. The advice can be willneed and sequential.
+Pass an advice to the specified file. The advice can be willneed, dontneed,
+noreuse, sequential, random.
.TP
\fBfallocate\fR \fI[-c] [-i] [-p] [-z] [keep_size] [offset] [length] [file]\fR
Request that space be allocated on a file. The
@@ -454,7 +454,10 @@ static void do_shutdown(int argc, char **argv, const struct cmd_desc *cmd)
"fadvice given the file\n" \
"advice can be\n" \
" willneed\n" \
+" dontneed\n" \
+" noreuse\n" \
" sequential\n" \
+" random\n" \
static void do_fadvise(int argc, char **argv, const struct cmd_desc *cmd)
{
@@ -471,8 +474,14 @@ static void do_fadvise(int argc, char **argv, const struct cmd_desc *cmd)
if (!strcmp(argv[1], "willneed")) {
advice = POSIX_FADV_WILLNEED;
+ } else if (!strcmp(argv[1], "dontneed")) {
+ advice = POSIX_FADV_DONTNEED;
+ } else if (!strcmp(argv[1], "noreuse")) {
+ advice = POSIX_FADV_NOREUSE;
} else if (!strcmp(argv[1], "sequential")) {
advice = POSIX_FADV_SEQUENTIAL;
+ } else if (!strcmp(argv[1], "random")) {
+ advice = POSIX_FADV_RANDOM;
} else {
fputs("Wrong advice\n\n", stderr);
fputs(cmd->cmd_help, stderr);
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> --- man/f2fs_io.8 | 3 ++- tools/f2fs_io/f2fs_io.c | 9 +++++++++ 2 files changed, 11 insertions(+), 1 deletion(-)