Skip to content

Commit f5e13ff

Browse files
author
Jaegeuk Kim
committed
Revert "f2fs_io: support xattr(large_folio)"
This reverts commit 1527dbf.
1 parent 8b0c58b commit f5e13ff

3 files changed

Lines changed: 0 additions & 46 deletions

File tree

man/f2fs_io.8

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,18 +53,10 @@ going down with fsck mark
5353
\fBpinfile\fR \fI[get|set|unset] [file]\fR
5454
Get or set the pinning status on a file.
5555
.TP
56-
\fBsetxattr\fR \fI[name] [value] [file]\fR
57-
Call setxattr to the file. The supported
58-
.I name
59-
are system.advise and user.fadvise.
60-
.TP
6156
\fBfadvise\fR \fI[advice] [offset] [length] [file]\fR
6257
Pass an advice to the specified file. The advice can be willneed, dontneed,
6358
noreuse, sequential, random.
6459
.TP
65-
\fBget_fadvise\fR \fI[file]\fR
66-
Show the activated fadvise flags.
67-
.TP
6860
\fBfallocate\fR \fI[-c] [-i] [-p] [-z] [keep_size] [offset] [length] [file]\fR
6961
Request that space be allocated on a file. The
7062
.I keep_size

tools/f2fs_io/f2fs_io.c

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -2084,7 +2084,6 @@ static void do_setxattr(int argc, char **argv, const struct cmd_desc *cmd)
20842084
int ret, len;
20852085
char *value;
20862086
unsigned char tmp;
2087-
unsigned int tmp_u;
20882087

20892088
if (argc != 4) {
20902089
fputs("Excess arguments\n\n", stderr);
@@ -2096,10 +2095,6 @@ static void do_setxattr(int argc, char **argv, const struct cmd_desc *cmd)
20962095
tmp = strtoul(argv[2], NULL, 0);
20972096
value = (char *)&tmp;
20982097
len = 1;
2099-
} else if (!strcmp(argv[1], F2FS_USER_FADVISE_NAME)) {
2100-
tmp_u = strtoul(argv[2], NULL, 0);
2101-
value = (char *)&tmp_u;
2102-
len = sizeof(unsigned int);
21032098
} else {
21042099
value = argv[2];
21052100
len = strlen(value);
@@ -2222,32 +2217,6 @@ static void do_get_advise(int argc, char **argv, const struct cmd_desc *cmd)
22222217
printf("\n");
22232218
}
22242219

2225-
#define get_fadvise_desc "get_fadvise"
2226-
#define get_fadvise_help "f2fs_io get_fadvise [file_path]\n\n"
2227-
2228-
static void do_get_fadvise(int argc, char **argv, const struct cmd_desc *cmd)
2229-
{
2230-
int ret;
2231-
unsigned int value;
2232-
2233-
if (argc != 2) {
2234-
fputs("Excess arguments\n\n", stderr);
2235-
fputs(cmd->cmd_help, stderr);
2236-
exit(1);
2237-
}
2238-
2239-
ret = getxattr(argv[1], F2FS_USER_FADVISE_NAME, &value, sizeof(value));
2240-
if (ret != sizeof(value)) {
2241-
perror("getxattr");
2242-
exit(1);
2243-
}
2244-
2245-
printf("fadvise=0x%x, advise_type: ", value);
2246-
if (value & (1 << F2FS_XATTR_FADV_LARGEFOLIO))
2247-
printf("largefolio");
2248-
printf("\n");
2249-
}
2250-
22512220
#define ftruncate_desc "ftruncate a file"
22522221
#define ftruncate_help \
22532222
"f2fs_io ftruncate [length] [file_path]\n\n" \
@@ -2657,7 +2626,6 @@ const struct cmd_desc cmd_list[] = {
26572626
CMD(removexattr),
26582627
CMD(lseek),
26592628
CMD(get_advise),
2660-
CMD(get_fadvise),
26612629
CMD(ioprio),
26622630
CMD(ftruncate),
26632631
CMD(test_create_perf),

tools/f2fs_io/f2fs_io.h

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

188188
#define F2FS_SYSTEM_ADVISE_NAME "system.advise"
189-
#define F2FS_USER_FADVISE_NAME "user.fadvise"
190189
#define FADVISE_COLD_BIT 0x01
191190
#define FADVISE_LOST_PINO_BIT 0x02
192191
#define FADVISE_ENCRYPT_BIT 0x04
@@ -196,11 +195,6 @@ struct fsverity_enable_arg {
196195
#define FADVISE_VERITY_BIT 0x40
197196
#define FADVISE_TRUNC_BIT 0x80
198197

199-
/* used for F2FS_USER_FADVISE_NAME */
200-
enum {
201-
F2FS_XATTR_FADV_LARGEFOLIO,
202-
};
203-
204198
/* used for F2FS_IOC_IO_PRIO */
205199
enum {
206200
F2FS_IOPRIO_WRITE = 1, /* high write priority */

0 commit comments

Comments
 (0)