Skip to content

Commit 69c366c

Browse files
author
Jaegeuk Kim
committed
f2fs_io: support xattr(system.fadvise)
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
1 parent 952551e commit 69c366c

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

tools/f2fs_io/f2fs_io.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2091,7 +2091,8 @@ static void do_setxattr(int argc, char **argv, const struct cmd_desc *cmd)
20912091
exit(1);
20922092
}
20932093

2094-
if (!strcmp(argv[1], F2FS_SYSTEM_ADVISE_NAME)) {
2094+
if (!strcmp(argv[1], F2FS_SYSTEM_ADVISE_NAME) ||
2095+
!strcmp(argv[1], F2FS_SYSTEM_ADVISE_NAME)) {
20952096
tmp = strtoul(argv[2], NULL, 0);
20962097
value = (char *)&tmp;
20972098
} else {

tools/f2fs_io/f2fs_io.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ struct fsverity_enable_arg {
186186
#define F2FS_IOC_FSSETXATTR FS_IOC_FSSETXATTR
187187

188188
#define F2FS_SYSTEM_ADVISE_NAME "system.advise"
189+
#define F2FS_SYSTEM_FADVISE_NAME "system.fadvise"
189190
#define FADVISE_COLD_BIT 0x01
190191
#define FADVISE_LOST_PINO_BIT 0x02
191192
#define FADVISE_ENCRYPT_BIT 0x04

0 commit comments

Comments
 (0)