Re: [f2fs-dev] [PATCH 1/2] f2fs-tools: delete only if the libf2fs_format.so* exists

2025-05-08 Thread Chao Yu via Linux-f2fs-devel
On 5/8/25 20:42, Jianan Huang wrote: > Otherwise we will get the following error when executing make uninstall: > > make uninstall-hook > make[2]: Entering directory '/home/huangjianan/code/f2fs-tools/mkfs' > rm /usr/local/lib/libf2fs_format.so* > rm: cannot remove '/usr/local/lib/libf2fs_format.

Re: [f2fs-dev] [PATCH 2/2] f2fs-tools: clean up dump.f2fs etc. when uninstall

2025-05-08 Thread Chao Yu via Linux-f2fs-devel
On 5/8/25 20:42, Jianan Huang wrote: > Otherwise, some lonely soft links will be left in /usr/local/bin. > > Signed-off-by: Jianan Huang Reviewed-by: Chao Yu Thanks, ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://l

[f2fs-dev] [PATCH v3] f2fs/013: test to check potential corruption on atomic_write file

2025-05-08 Thread Chao Yu via Linux-f2fs-devel
This is a regression testcase to check whether we will handle database inode dirty status correctly: 1. mount f2fs image w/ timeout fault injection option 2. create a regular file, and write data into the file 3. start transaction on the file (via F2FS_IOC_START_ATOMIC_WRITE) 4. write transaction d

[f2fs-dev] [jaegeuk-f2fs:dev-test 186/188] include/linux/kern_levels.h:5:25: warning: format '%zu' expects argument of type 'size_t', but argument 5 has type 'long unsigned int'

2025-05-08 Thread kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git dev-test head: 33605141d92b1eb2a5e625a79abe35856a588662 commit: 00ed768afb17ecfb7633466256f9f16514e8b421 [186/188] f2fs: separate the options parsing and options checking config: i386-buildonly-randconfig-001-20250509 (ht

[f2fs-dev] [PATCH 6.1.y] f2fs: fix to cover read extent cache access with lock

2025-05-08 Thread jianqi.ren.cn--- via Linux-f2fs-devel
From: Chao Yu [ Upstream commit d7409b05a64f212735f0d33f5f1602051a886eab ] syzbot reports a f2fs bug as below: BUG: KASAN: slab-use-after-free in sanity_check_extent_cache+0x370/0x410 fs/f2fs/extent_cache.c:46 Read of size 4 at addr 8880739ab220 by task syz-executor200/5097 CPU: 0 PID: 50

Re: [f2fs-dev] [PATCH V3 5/7] f2fs: separate the options parsing and options checking

2025-05-08 Thread Eric Sandeen via Linux-f2fs-devel
On 5/8/25 10:52 AM, Eric Sandeen wrote: >>> + >>> + if (f2fs_test_compress_extension(F2FS_CTX_INFO(ctx).noextensions, >>> + F2FS_CTX_INFO(ctx).nocompress_ext_cnt, >>> + F2FS_CTX_INFO(ctx).extensions, >>> + F2FS_CTX_INFO

Re: [f2fs-dev] [PATCH v3] f2fs/012: test red heart lookup

2025-05-08 Thread Zorro Lang via Linux-f2fs-devel
On Wed, May 07, 2025 at 01:36:42PM +0800, Chao Yu wrote: > As Han Qi reported in bugzilla [1], commit 5c26d2f1d3f5 ("unicode: Don't > special case ignorable code points") changes logic to handle ignorable > code points, when we handle filename which has special unicode charactor > like red heart ❤️

Re: [f2fs-dev] [PATCH V3 7/7] f2fs: switch to the new mount api

2025-05-08 Thread Eric Sandeen via Linux-f2fs-devel
On 5/8/25 4:19 AM, Chao Yu wrote: >> @@ -2645,21 +2603,11 @@ static int f2fs_remount(struct super_block *sb, int >> *flags, char *data) >> >> default_options(sbi, true); >> >> -memset(&fc, 0, sizeof(fc)); >> -memset(&ctx, 0, sizeof(ctx)); >> -fc.fs_private = &ctx; >> -fc.p

Re: [f2fs-dev] [PATCH 1/6] f2fs: fix to return correct error number in f2fs_sync_node_pages()

2025-05-08 Thread patchwork-bot+f2fs--- via Linux-f2fs-devel
Hello: This series was applied to jaegeuk/f2fs.git (dev) by Jaegeuk Kim : On Thu, 8 May 2025 07:14:27 +0200 you wrote: > From: Chao Yu > > If __write_node_folio() failed, it will return AOP_WRITEPAGE_ACTIVATE, > the incorrect return value may be passed to userspace in below path, > fix it. >

[f2fs-dev] Patchwork summary for: f2fs

2025-05-08 Thread patchwork-bot+f2fs--- via Linux-f2fs-devel
Hello: The following patches were marked "accepted", because they were applied to jaegeuk/f2fs.git (dev): Series: [f2fs-dev,1/6] f2fs: fix to return correct error number in f2fs_sync_node_pages() Submitter: Christoph Hellwig Committer: Jaegeuk Kim Patchwork: https://patchwork.kernel.org/

Re: [f2fs-dev] [PATCH] f2fs: fix to return correct error number in f2fs_sync_node_pages()

2025-05-08 Thread patchwork-bot+f2fs--- via Linux-f2fs-devel
Hello: This patch was applied to jaegeuk/f2fs.git (dev) by Jaegeuk Kim : On Wed, 7 May 2025 16:08:38 +0800 you wrote: > If __write_node_folio() failed, it will return AOP_WRITEPAGE_ACTIVATE, > the incorrect return value may be passed to userspace in below path, > fix it. > > - sync_filesystem >

Re: [f2fs-dev] [PATCH 1/4] f2fs: return bool from __f2fs_write_meta_folio

2025-05-08 Thread patchwork-bot+f2fs--- via Linux-f2fs-devel
Hello: This series was applied to jaegeuk/f2fs.git (dev) by Jaegeuk Kim : On Mon, 5 May 2025 11:25:58 +0200 you wrote: > __f2fs_write_meta_folio can only return 0 or AOP_WRITEPAGE_ACTIVATE. > As part of phasing out AOP_WRITEPAGE_ACTIVATE, switch to a bool return > instead. > > Signed-off-by: Ch

Re: [f2fs-dev] [PATCH V3 5/7] f2fs: separate the options parsing and options checking

2025-05-08 Thread Eric Sandeen via Linux-f2fs-devel
On 5/8/25 3:13 AM, Chao Yu wrote: > On 4/24/25 01:08, Eric Sandeen wrote: >> From: Hongbo Li ... >> +if (ctx->qname_mask) { >> +for (i = 0; i < MAXQUOTAS; i++) { >> +if (!(ctx->qname_mask & (1 << i))) >> +continue; >> + >> +

Re: [f2fs-dev] [PATCH 5/6] f2fs: simplify return value handling in f2fs_fsync_node_pages

2025-05-08 Thread Chao Yu via Linux-f2fs-devel
On 5/8/25 13:14, Christoph Hellwig wrote: > Always assign ret where the error happens, and jump to out instead > of multiple loop exit conditions to prepare for changes in the > __write_node_folio calling convention. > > Signed-off-by: Christoph Hellwig Reviewed-by: Chao Yu Thanks, _

[f2fs-dev] [PATCH 2/2] f2fs-tools: clean up dump.f2fs etc. when uninstall

2025-05-08 Thread Jianan Huang via Linux-f2fs-devel
Otherwise, some lonely soft links will be left in /usr/local/bin. Signed-off-by: Jianan Huang --- fsck/Makefile.am | 8 1 file changed, 8 insertions(+) diff --git a/fsck/Makefile.am b/fsck/Makefile.am index ea3b26a..f0d7f87 100644 --- a/fsck/Makefile.am +++ b/fsck/Makefile.am @@ -21,3

[f2fs-dev] [PATCH 1/2] f2fs-tools: delete only if the libf2fs_format.so* exists

2025-05-08 Thread Jianan Huang via Linux-f2fs-devel
Otherwise we will get the following error when executing make uninstall: make uninstall-hook make[2]: Entering directory '/home/huangjianan/code/f2fs-tools/mkfs' rm /usr/local/lib/libf2fs_format.so* rm: cannot remove '/usr/local/lib/libf2fs_format.so*': No such file or directory make[2]: *** [Mak

Re: [f2fs-dev] [PATCH 4/6] f2fs: always unlock the page in f2fs_write_single_data_page

2025-05-08 Thread Chao Yu via Linux-f2fs-devel
On 5/8/25 13:14, Christoph Hellwig wrote: > Consolidate the code to unlock the page in f2fs_write_single_data_page > instead of leaving it to the callers for the AOP_WRITEPAGE_ACTIVATE case. > Replace AOP_WRITEPAGE_ACTIVATE with a positive return of 1 as this case > now doesn't match the historic -

Re: [f2fs-dev] [PATCH 3/6] f2fs: remove wbc->for_reclaim handling

2025-05-08 Thread Chao Yu via Linux-f2fs-devel
On 5/8/25 13:14, Christoph Hellwig wrote: > Since commits 7ff0104a8052 ("f2fs: Remove f2fs_write_node_page()") and > 3b47398d9861 ("f2fs: Remove f2fs_write_meta_page()'), f2fs can't be > called from reclaim context any more. Remove all code keyed of the > wbc->for_rename flag, which is now only se

Re: [f2fs-dev] [PATCH v4 2/2] f2fs: add ckpt_valid_blocks to the section entry

2025-05-08 Thread Chao Yu via Linux-f2fs-devel
On 5/8/25 15:47, yohan.joung wrote: > when performing buffered writes in a large section, > overhead is incurred due to the iteration through > ckpt_valid_blocks within the section. > when SEGS_PER_SEC is 128, this overhead accounts for 20% within > the f2fs_write_single_data_page routine. > as the

Re: [f2fs-dev] [PATCH v4 1/2] f2fs: add a method for calculating the remaining blocks in the current segment in LFS mode.

2025-05-08 Thread Chao Yu via Linux-f2fs-devel
On 5/8/25 15:47, yohan.joung wrote: > In LFS mode, the previous segment cannot use invalid blocks, > so the remaining blocks from the next_blkoff of the current segment > to the end of the section are calculated. > > Signed-off-by: yohan.joung Reviewed-by: Chao Yu Thanks, ___

Re: [f2fs-dev] [PATCH V3 7/7] f2fs: switch to the new mount api

2025-05-08 Thread Chao Yu via Linux-f2fs-devel
On 4/24/25 01:08, Eric Sandeen wrote: > From: Hongbo Li > > The new mount api will execute .parse_param, .init_fs_context, .get_tree > and will call .remount if remount happened. So we add the necessary > functions for the fs_context_operations. If .init_fs_context is added, > the old .mount shou

Re: [f2fs-dev] [PATCH V3 5/7] f2fs: separate the options parsing and options checking

2025-05-08 Thread Chao Yu via Linux-f2fs-devel
On 4/24/25 01:08, Eric Sandeen wrote: > From: Hongbo Li > > The new mount api separates option parsing and super block setup > into two distinct steps and so we need to separate the options > parsing out of the parse_options(). > > In order to achieve this, here we handle the mount options with

Re: [f2fs-dev] [PATCH V3 6/7] f2fs: introduce fs_context_operation structure

2025-05-08 Thread Chao Yu via Linux-f2fs-devel
On 4/24/25 01:08, Eric Sandeen wrote: > From: Hongbo Li > > The handle_mount_opt() helper is used to parse mount parameters, > and so we can rename this function to f2fs_parse_param() and set > it as .param_param in fs_context_operations. > > Signed-off-by: Hongbo Li > [sandeen: forward port] >

[f2fs-dev] [PATCH v4 1/2] f2fs: add a method for calculating the remaining blocks in the current segment in LFS mode.

2025-05-08 Thread yohan.joung
In LFS mode, the previous segment cannot use invalid blocks, so the remaining blocks from the next_blkoff of the current segment to the end of the section are calculated. Signed-off-by: yohan.joung --- fs/f2fs/segment.h | 23 +++ 1 file changed, 19 insertions(+), 4 deletions(

[f2fs-dev] [PATCH v4 2/2] f2fs: add ckpt_valid_blocks to the section entry

2025-05-08 Thread yohan.joung
when performing buffered writes in a large section, overhead is incurred due to the iteration through ckpt_valid_blocks within the section. when SEGS_PER_SEC is 128, this overhead accounts for 20% within the f2fs_write_single_data_page routine. as the size of the section increases, the overhead als