Commit Graph

1056 Commits

Author SHA1 Message Date
Chao Yu
bce0e1e051 f2fs_io: {set,clear}flags: support immutable flag correctly
Hand over immutable flag clearing functionality from setflags to
clearflags, since the flag name is immutable rather than noimmutable.

And support setting functionality in subcommand setflags.

Signed-off-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2024-10-21 23:25:32 +00:00
Jaegeuk Kim
bd9d28398d mkfs.f2fs: don't trim on aliased partition
Reviewed-by: Daeho Jeong <daehojeong@google.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2024-10-15 17:08:35 +00:00
Jaegeuk Kim
83f090d220 f2fs-tools: remove linux/fcntl.h but define the hint directly
It's complicated to address libc and kernel headers.

Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2024-10-15 15:23:28 +00:00
Jaegeuk Kim
7326e5aff3 f2fs_io: choose MB/s instead of MiB/s
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2024-10-14 21:31:44 +00:00
Jaegeuk Kim
312de6fd6d f2fs_io: support fadvice for read
This adds a way to boost read performance by giving fadvise.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2024-10-14 16:26:40 +00:00
LongPing Wei
0cd64a71ef f2fs_io: add fdatasync
Signed-off-by: LongPing Wei <weilongping@oppo.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2024-10-14 16:26:40 +00:00
Daeho Jeong
8cc4e257ec mkfs.f2fs: add device aliasing feature
We can add a device aliasing file which can map the whole device with an
extent, not using node blocks. This mapped area should be pinned and
normally used for read-only usages. After finished using it, we can
deallocate the whole area and return it back to use it for other files.

Signed-off-by: Daeho Jeong <daehojeong@google.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2024-10-11 22:49:52 +00:00
Daeho Jeong
c35fa8cd75 mkfs.f2fs: change -c option description
Current description confuses users like they can add addtional devices
with one -c option using commas(,) at the same time.

Signed-off-by: Daeho Jeong <daehojeong@google.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2024-10-11 22:49:52 +00:00
Daejun Park
5c06793f80 f2fs-tools: add write hint support
This patch enables support for write hints by segment type.

Signed-off-by: Daejun Park <daejun7.park@samsung.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2024-10-11 22:49:52 +00:00
Daeho Jeong
48fb9473ce fsck.f2fs: remove redundant i_ext.len set to zero
Removed a redundant code to set i_ext.len to zero.

Signed-off-by: Daeho Jeong <daehojeong@google.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2024-10-11 22:49:52 +00:00
Chao Yu
4ce6d22c20 fsck.f2fs: support to add missing '.' or '..' dirent
Previously, once fsck.f2fs detects that directory missed '.' or
'..' dirent, it tags inode w/ F2FS_INLINE_DOTS flag, and expects
f2fs kernel module can repaire it online during it runs to lookup()
on target directory.

This patch abandons previous implementation, and do repaires directly.

Reviewed-by: Sheng Yong <shengyong@oppo.com>
Signed-off-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2024-10-11 22:49:52 +00:00
Chao Yu
82b59c71a7 fsck.f2fs: fix to detect double '.' or '..'
If there are double '.' or '..' dirents in directory, fsck.f2fs won't
detect and repaire the issue correctly, fix it.

Reviewed-by: Sheng Yong <shengyong@oppo.com>
Signed-off-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2024-10-11 22:49:52 +00:00
Daeho Jeong
662e619cfa mkfs.f2fs: use correct endian conversion for writing lpf inode
The conversion between cpu and little endian is incorrect.

Signed-off-by: Daeho Jeong <daehojeong@google.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2024-10-11 22:49:52 +00:00
Sheng Yong
9ad0ad3a7f inject.f2fs: add dentry injection
This patch enables injecting dentry block or dir entry.
print_raw_dentry_info() is added to show values of node footer.

The meanings of options are:
 * dent: means dentry is injected.

The members could be injected in cp contains:
 * d_bitmap: dentry block d_bitmap of nid
 * d_hash: dentry hash
 * d_ino: dentry ino
 * d_ftype: dentry ftype

Signed-off-by: Sheng Yong <shengyong@oppo.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2024-10-11 22:49:52 +00:00
zhangxirui
b9a68f381b f2fs-tools: reduce overprov_segment_count set times
If overprov_segment_count < rsvd_segment_count will
set_cp(overprov_segment_count) twice, reduce it.

Signed-off-by: zhangxirui <xirui.zhang@vivo.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2024-08-15 15:22:43 +00:00
Jaegeuk Kim
896eff74db fsck.f2fs: don't finish zones if it's not open
Should finish zones if they are open.

Reviewed-by: Daeho Jeong <daehojeong@google.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2024-08-15 15:22:39 +00:00
Jaegeuk Kim
f6f6448591 inject.f2fs: install makefile
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2024-07-31 20:28:05 +00:00
Jaegeuk Kim
309f273b3d inject.f2fs: fix some build errors
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2024-07-31 20:28:00 +00:00
Wu Bo
6efff7aee3 dump.f2fs: add checkpoint version to dump_nat
The cp_ver of node footer is useful when analyzing data corruption
issues.

Signed-off-by: Wu Bo <bo.wu@vivo.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2024-07-30 16:31:59 +00:00
Peter Collingbourne
72f6b7806c mkfs.f2fs: Fix out-of-bounds read in f2fs_prepare_super_block
The path field in c.devices[i] is a pointer and is normally filled
in using strdup. This makes it invalid to copy MAX_PATH_LEN bytes
from it because the string may be shorter than that. Therefore,
fix the code to use strncpy to copy the string instead.

Signed-off-by: Peter Collingbourne <pcc@google.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2024-07-30 16:31:59 +00:00
Sheng Yong
1aeab18dc6 man: add inject.f2fs man page
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Sheng Yong <shengyong@oppo.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2024-07-25 18:40:29 +00:00
Sheng Yong
ed8b267262 inject.f2fs: add node injection
This patch enables injecting node block. print_node_footer_info() is
added to show values of node footer.

The meanings of options are:
 * node: means node is injected.

The members could be injected in cp contains:
 * nid: node footer nid
 * ino: node footer ino
 * flag: node footer flag
 * cp_ver: node footer cp_ver
 * next_blkaddr: node footer next_blkaddr
 * i_mode: inode i_mode
 * i_advise: inode i_advise
 * i_inline: inode i_inline
 * i_links: inode i_links
 * i_size: inode i_size
 * i_blocks: inode i_blocks
 * i_extra_isize: inode i_extra_isize
 * i_inode_checksum: inode i_inode_checksum
 * i_addr: inode i_addr array
 * i_nid: inode i_nid array
 * addr: {in}direct node nid/addr array

Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Sheng Yong <shengyong@oppo.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2024-07-25 18:40:29 +00:00
Sheng Yong
27aa00c503 inject.f2fs: add ssa injection
This patch enables injecting summary block or summary entry.
print_raw_sum_entry_info() and print_sum_footer_info() are added to show
values of the ssa entry and summary footer.

The meanings of options are:
 * ssa: means ssa entry is injected.

The members could be injected in cp contains:
 * entry_type: summary block footer entry_type
 * check_sum: summary block footer check_sum
 * nid: summary entry nid
 * version: summary entry version
 * ofs_in_node: summary entry ofs_in_node

Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Sheng Yong <shengyong@oppo.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2024-07-25 18:40:29 +00:00
Sheng Yong
0d7c27c5da inject.f2fs: add sit injection
This patch enables injecting sit entry. print_raw_sit_entry_info() is
added to show values of the sit entry.

The meanings of options are:
 * sit: means sit entry is injected, its argument chooses which sit pack
        to be injected, where 0 means the current valid sit is choosen
	automatically.
 * blk: is the block address of the sit entry.

The members could be injected in cp contains:
 * vblocks: sit entry vblocks
 * valid_map: sit entry valid_map
 * mtime: sit entry mtime

Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Sheng Yong <shengyong@oppo.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2024-07-25 18:40:29 +00:00
Sheng Yong
28754d326c inject.f2fs: add nat injection
This patch enables injecting nat entry. print_raw_nat_entry_info() is
added to show values of the nat entry.

The meanings of options are:
 * nat: means nat entry is injected, its argument chooses which nat pack
        to be injected, where 0 means the current valid nat is choosen
	automatically.
 * nid: is the nid of the nat entry

The members could be injected in cp contains:
 * version: nat entry version
 * ino: nat entry ino
 * block_addr: nat entry block_addr

Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Sheng Yong <shengyong@oppo.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2024-07-25 18:40:29 +00:00
Sheng Yong
a6cca0edf0 inject.f2fs: add cp injection
This patch enables injecting checkpoint. To archive this, a helper
write_raw_cp_blocks() is added to write the first and last blocks
of a specific cp. And print_ckpt_info() is exported to show new
checkpoint info.

The meanings of options are:
 * cp: means cp is injected, its argument chooses which cp pack to be
       injected, where 0 means the current valid cp is choosen
       automatically.

The members could be injected in cp contains:
 * checkpoint_ver: checkpoint version
 * ckpt_flags: checkpoint flags
 * cur_node_segno: cur_node_segno array
 * cur_node_blkoff: cur_node_blkoff array
 * cur_data_segno: cur_data_segno array
 * cur_data_blkoff: cur_data_blkoff array

Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Sheng Yong <shengyong@oppo.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2024-07-25 18:40:29 +00:00
Sheng Yong
082e3515a7 inject.f2fs: add sb injection
This patch enables injecting super block.

The meanings of options are:
 * sb: means sb is injected, its argument chooses which sb pack to be
       injected, where 0 means the current valid sb is choosen
       automatically.
 * mb: indicates which member in sb is injected, its argument is the
       member name.
 * idx: is used when the mb is an array, its argument is the index of
        the array.
 * val: is the new value to be set when the type of mb is a number.
 * str: is the new value to be set when the type of mb is a string.

The members could be injected in sb contains:
 * magic: magic number
 * s_stop_reason: s_stop_reason array
 * s_errors: s_errors array
 * devs.path: path in devs array

Signed-off-by: Sheng Yong <shengyong@oppo.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2024-07-25 18:40:29 +00:00
Sheng Yong
b39aa80647 inject.f2fs: introduce inject.f2fs
This patch introduces a new tool inject.f2fs to modify metadata or data
(directory entry) of f2fs image offline flexibly.

With inject.f2fs, it is easier to generate a corrupted f2fs image, which
can help verify fsck or reproduce userspace behaviors of some a fault.
If option `--dry-run' is used, nothing really gets changed, and that
could be used to get the value of a specified field.

The following patches enable injecting each part of f2fs.

Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Sheng Yong <shengyong@oppo.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2024-07-25 18:40:29 +00:00
Sheng Yong
a9066a4e23 f2fs-tools: cleanup is_sit_bitmap_set
Remove redundant function definition of is_sit_bitmap_set() and
export it.

Signed-off-by: Sheng Yong <shengyong@oppo.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2024-07-25 18:40:29 +00:00
Sheng Yong
2c7fa4f0a1 f2fs-tools: show device info of sb->devs
Show multidevice infomation like the follwoing:

  devs[i].path                            [meta.img]
  devs[i].total_segments                  [0x      3f : 63]
  devs[i].path                            [data.img]
  devs[i].total_segments                  [0x      80 : 128]

Signed-off-by: Sheng Yong <shengyong@oppo.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2024-07-25 18:40:29 +00:00
Sheng Yong
2d653ca599 fsck.f2fs: check all-zero inline data with helper is_zeroed
Signed-off-by: Sheng Yong <shengyong@oppo.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2024-07-25 18:40:28 +00:00
Sheng Yong
752fcbe65a fsck.f2fs: fix checking wp of all devices
For zoned model, the first device (devices[0]) is not zoned device,
whose zoned_model is not F2FS_ZONED_HM. Let's skip it and check write
pointer of left devices continuously.

Signed-off-by: Sheng Yong <shengyong@oppo.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2024-07-25 18:40:28 +00:00
Sheng Yong
3a3d362a86 fsck.f2fs: update superblock if invalid
If a superblock failed in sanity check, it should be fixed. This patch
add a new state `sb_invalid' to tell fsck needs to update superblock
at the end of all checkings.

This patch also cleans up force_stop, abnormal_stop, fs_errors and
sb_invalid by merging them into an `invalid_sb' flags, and each of
them is indicated using one bit.

Signed-off-by: Sheng Yong <shengyong@oppo.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2024-07-25 18:40:28 +00:00
Chao Yu
d31d5f26ae f2fs-tools: clean up addrs_per_{inode,block}()
Introduce a new help addrs_per_page() to wrap common code
from addrs_per_inode() and addrs_per_block() for cleanup.

Signed-off-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2024-07-25 18:40:28 +00:00
Chao Yu
250d610d62 f2fs-tools: fix to add missing le32_to_cpu()/cpu_to_le32()
This patch fixes some cases in where we missed to consider
endianness when we access/update inode.i_flags.

Signed-off-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2024-07-25 18:40:28 +00:00
Chao Yu
1a1e775935 f2fs-tools: fix to do not dump inode if it has F2FS_NODUMP_FL flag
Quoted from manual of chattr:
"
CHATTR(1)
...

ATTRIBUTES
A file with the 'd' attribute set is not a candidate for backup when
the dump(8) program is run.
"

Once we set F2FS_NODUMP_FL flag to inode, do not allow dumping info
from it.

Signed-off-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2024-07-25 18:40:28 +00:00
Wu Bo
4f7ac389f4 libf2fs: add BLKFINISHZONE define if not defined
BLKFINISHZONE may not defined in old blkzoned.h, and cause build error.

Signed-off-by: Wu Bo <bo.wu@vivo.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2024-07-25 18:40:28 +00:00
Daniel Rosenberg
a66d49fd26 dump.f2fs: Dump symlinks as symlinks
Previously, dumped symlinks would always create regular files instead.
This allows symlinks to be dumped as symlinks with the -L option.

The i_name field's name may not be the same as the actual name from the
dirent, so we use the dirent name when available.

Currently hardlinks aren't detected, so print a warning if we notice a
nondirectory with a link count over 1.

Signed-off-by: Daniel Rosenberg <drosen@google.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2024-07-25 18:40:28 +00:00
Sheng Yong
4a5da2ef15 f2fs-tools: export is_digits
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Sheng Yong <shengyong@oppo.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2024-07-10 22:51:40 +00:00
Xiuhong Wang
bd1474707d f2fs-tools: fix do_set_verity ioctl fail issue
When using the f2fs_io tool to set_verity, it will fail as follows:
unisc:/data # ./f2fs_io set_verity file
FS_IOC_ENABLE_VERITY: Inappropriate ioctl for device
this is because commit: 95ae251fe828 ("f2fs: add fs-verity support"),
the passed parameters do not match the latest kernel version.

After patch:
unisoc:/data # ./f2fs_io set_verity file
Set fsverity bit to file
unisoc:/data # ./f2fs_io getflags file
get a flag on file ret=0, flags=verity

Fixes: 95ae251fe828 ("f2fs: add fs-verity support")
Signed-off-by: Xiuhong Wang <xiuhong.wang@unisoc.com>
Signed-off-by: Zhiguo Niu <zhiguo.niu@unisoc.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2024-07-09 21:41:18 +00:00
Xiuhong Wang
584ebc710b f2fs-tools: use atoll replace atoi to avoid data truncate
If input exceeds int range, data will be truncated, such as lseek:
unisoc:/data # ./f2fs_io lseek set 3221225000 file
returned offset=2147483647
The offset is truncated.

After patch:
unisoc:/data # ./f2fs_io lseek set 3221225000 file
returned offset=3221225000

Signed-off-by: Xiuhong Wang <xiuhong.wang@unisoc.com>
Signed-off-by: Zhiguo Niu <zhiguo.niu@unisoc.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2024-06-24 17:47:35 +00:00
Daniel Rosenberg
b5ec029d2b dump.f2fs: Fix dumping inlined files
The code for dumping files was ignoring i_extra_isize, leading to
invalid data for some inlined files after dumping. This swaps inode
dumping to use the common inline_data_addr function.

Signed-off-by: Daniel Rosenberg <drosen@google.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2024-06-24 17:44:31 +00:00
Chao Yu
c07b095450 dump.f2fs: update dump_usage() for directory dumping
Add missing usage for directory dumping functionality of dump.f2fs
as below:

  -r dump out from the root inode
  -f do not prompt before dumping
  -y alias for -f
  -o dump inodes to the given path
  -P preserve mode/owner/group for dumped inode

Cc: Daniel Rosenberg <drosen@google.com>
Signed-off-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2024-06-04 18:11:49 +00:00
Chao Yu
a3104a1597 f2fs_io: fix output of do_read()
echo 1 > file
f2fs_io read 1 0 1 dio 4096 ./file
Read 0 bytes total_time = 17 us, print 4096 bytes:
00000000 : ffffffd537 ffffffc957 0500 0000 0000 0000 0000 0000
00000100 : 0000 0000 0000 0000 0000 0000 0000 0000
00000200 : 0000 0000 0000 0000 0000 0000 0000 0000
00000300 : 0000 0000 0000 0000 ffffffc10f 0200 0000 0000

For the case reading across EOF, it missed to copy returned
data to print_buf.

After:
f2fs_io read 1 0 1 dio 4096 ./file
pread expected: 4096, readed: 2
Read 2 bytes total_time = 177 us, print 4096 bytes:
00000000 : 310a 0000 0000 0000 0000 0000 0000 0000

Signed-off-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2024-05-30 23:42:53 +00:00
Daniel Rosenberg
c1a97862b0 dump.f2fs: Fix xattr dumping
Xattrs for files with inline data were being skipped. This dumps those,
as well as xattrs for folders.

Signed-off-by: Daniel Rosenberg <drosen@google.com>
Reviewed-by: Daeho Jeong <daehojeong@google.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2024-05-23 23:28:35 +00:00
Daniel Rosenberg
d5a053ee06 dump.f2fs: Add ability to dump folders
This adds the ability to dump folders as well as files. Folders are
dumped recursively. Additionally, dumped files/folders may be directed
to a folder specified by -o [path] instead of ./lost_found. The -r flag
will dump the entire fs from the root inode. -f or -y will skip the
prompt before dumping, and -P will preserve the mode/owner info for the
created file/folder.

Signed-off-by: Daniel Rosenberg <drosen@google.com>
Reviewed-by: Daeho Jeong <daehojeong@google.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2024-05-23 23:28:29 +00:00
Sheng Yong
5cfe1971ad mkfs.f2fs: align each device to zone size
For multiple device, each device should be aligned to zone size, instead
of aligning the total size.

Signed-off-by: Sheng Yong <shengyong@oppo.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2024-05-09 00:42:09 +00:00
Chao Yu
acaa17359c mkfs.f2fs: add description for ro feature in manual
Add missing description for readonly feature in manual of mkfs.f2fs.

Signed-off-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2024-04-16 16:54:02 +00:00
Chao Yu
91e7365533 f2fs_io: support unset subcommand for pinfile
This patch adds unset subcommand for pinfile command.

Usage: f2fs_io pinfile unset [target_file]

Signed-off-by: Chao Yu <chao@kernel.org>
Reviewed-by: Daeho Jeong <daehojeong@google.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2024-04-12 20:54:18 +00:00
Sheng Yong
cc40084468 f2fs-tools: print extension list properly
The "hot file extensions" list does not print properly.

**Before**

extension_count                         [0x      23 : 35]
cold file extentsions
                                        [mp      wm      og      jp      ]
                                        [avi     m4v     m4p     mkv     ]
                                        [mov     webm    wav     m4a     ]
                                        [3gp     opus    flac    gif     ]
                                        [png     svg     webp    jar     ]
                                        [deb     iso     gz      xz      ]
                                        [zst     pdf     pyc     ttc     ]
                                        [ttf     exe     apk     cnt     ]
                                        [exo     odex    vdex    ]
hot_ext_count                           [0x       1 : 1]
hot file extentsions
db      ]
cp_payload                              [0x       0 : 0]

**After**

extension_count                         [0x      23 : 35]
cold file extentsions
                                        [mp      wm      og      jp      ]
                                        [avi     m4v     m4p     mkv     ]
                                        [mov     webm    wav     m4a     ]
                                        [3gp     opus    flac    gif     ]
                                        [png     svg     webp    jar     ]
                                        [deb     iso     gz      xz      ]
                                        [zst     pdf     pyc     ttc     ]
                                        [ttf     exe     apk     cnt     ]
                                        [exo     odex    vdex            ]
hot_ext_count                           [0x       1 : 1]
hot file extentsions
                                        [db                              ]
cp_payload                              [0x       0 : 0]

Signed-off-by: Sheng Yong <shengyong@oppo.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2024-04-10 00:35:35 +00:00