[f2fs-dev] [PATCH v2] dump.f2fs: Dump symlinks as symlinks

2024-07-17 Thread Daniel Rosenberg via Linux-f2fs-devel
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, s

Re: [f2fs-dev] [PATCH] f2fs: test for race condition in between atomic_write and gc

2024-07-17 Thread Zorro Lang
On Wed, Jul 17, 2024 at 10:12:16AM +0800, Chao Yu wrote: > On 2024/7/16 18:57, Zorro Lang wrote: > > On Tue, Jun 25, 2024 at 11:04:16AM +0800, Chao Yu wrote: > > > Test that we will simulate sqlite atomic write logic w/ below steps: > > > 1. create a regular file, and initialize it w/ 0xff data > >

[f2fs-dev] [PATCH] f2fs-tools: clean up addrs_per_{inode,block}()

2024-07-17 Thread Chao Yu
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 --- include/f2fs_fs.h | 7 +++ lib/libf2fs.c | 13 +++-- 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/include/f2fs_fs.h b

[f2fs-dev] [PATCH] f2fs-tools: fix to add missing le32_to_cpu()/cpu_to_le32()

2024-07-17 Thread Chao Yu
This patch fixes some cases in where we missed to consider endianness when we access/update inode.i_flags. Signed-off-by: Chao Yu --- fsck/fsck.c| 9 + fsck/node.c| 2 +- include/f2fs_fs.h | 12 mkfs/f2fs_format.c | 2 +- 4 files changed, 11 insertions(+)

[f2fs-dev] [PATCH] f2fs-tools: fix to do not dump inode if it has F2FS_NODUMP_FL flag

2024-07-17 Thread Chao Yu
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 --- fsck/dump.c | 4 1 file chang