Re: [f2fs-dev] [PATCH v3 2/2] f2fs: Add sanity checks before unlinking and loading inodes

2025-11-04 Thread Chao Yu via Linux-f2fs-devel
On 11/4/25 16:46, Nikola Z. Ivanov wrote: > Add check for inode->i_nlink == 1 for directories during unlink, > as their value is decremented twice, which can trigger a warning in > drop_nlink. In such case mark the filesystem as corrupted and return > from the function call with the relevant failur

[f2fs-dev] [PATCH 2/2] f2fs: fix to detect recoverable inode during dryrun of find_fsync_dnodes()

2025-11-04 Thread Chao Yu via Linux-f2fs-devel
mkfs.f2fs -f /dev/vdd mount /dev/vdd /mnt/f2fs touch /mnt/f2fs/foo sync# avoid CP_UMOUNT_FLAG in last f2fs_checkpoint.ckpt_flags touch /mnt/f2fs/bar f2fs_io fsync /mnt/f2fs/bar f2fs_io shutdown 2 /mnt/f2fs umount /mnt/f2fs blockdev --setro /dev/vdd mount /dev/vdd /mnt/f2fs mount: /mnt/f

[f2fs-dev] [PATCH 1/2] f2fs: fix return value of f2fs_recover_fsync_data()

2025-11-04 Thread Chao Yu via Linux-f2fs-devel
With below scripts, it will trigger panic in f2fs: mkfs.f2fs -f /dev/vdd mount /dev/vdd /mnt/f2fs touch /mnt/f2fs/foo sync echo 111 >> /mnt/f2fs/foo f2fs_io fsync /mnt/f2fs/foo f2fs_io shutdown 2 /mnt/f2fs umount /mnt/f2fs mount -o ro,norecovery /dev/vdd /mnt/f2fs or mount -o ro,disable_roll_forwa

Re: [f2fs-dev] [syzbot] [iomap?] kernel BUG in folio_end_read (2)

2025-11-04 Thread Petr Mladek via Linux-f2fs-devel
Adding John into Cc. On Tue 2025-11-04 09:45:27, Joanne Koong wrote: > On Mon, Nov 3, 2025 at 6:43 PM syzbot > wrote: > > > > Hello, > > > > syzbot has tested the proposed patch but the reproducer is still triggering > > an issue: > > WARNING in get_data > > > > loop0: detected capacity change f

Re: [f2fs-dev] [syzbot] [iomap?] kernel BUG in folio_end_read (2)

2025-11-04 Thread Joanne Koong
On Mon, Nov 3, 2025 at 6:43 PM syzbot wrote: > > Hello, > > syzbot has tested the proposed patch but the reproducer is still triggering > an issue: > WARNING in get_data > > loop0: detected capacity change from 0 to 16 > [ cut here ] > WARNING: kernel/printk/printk_ringbuf

[f2fs-dev] [PATCH] f2fs: revert summary entry count from 2048 to 512 in 16kb block support

2025-11-04 Thread Daeho Jeong
From: Daeho Jeong The recent increase in the number of Segment Summary Area (SSA) entries from 512 to 2048 was an unintentional change in logic of 16kb block support. This commit corrects the issue. To better utilize the space available from the erroneous 2048-entry calculation, we are implement

[f2fs-dev] [PATCH v4] f2fs-tools: revert summary entry count from 2048 to 512 in 16kb block support

2025-11-04 Thread Daeho Jeong
From: Daeho Jeong The recent increase in the number of Segment Summary Area (SSA) entries from 512 to 2048 was an unintentional change in logic of 16kb block support. This commit corrects the issue. To better utilize the space available from the erroneous 2048-entry calculation, we are implement

[f2fs-dev] [PATCH v3 0/2] f2fs: Add sanity checks before unlinking and loading inodes

2025-11-04 Thread Nikola Z. Ivanov
This series is provoked by syzbot warnings caused by corrupted directory inode with i_nlink == 1 that passes the initial sanity check which will only mark the filesystem as corrupted in case i_nlink == 0. Tests: - fio/fsmark parallel create/unlink on VM with f2fs root filesystem. - syzbot Changel

[f2fs-dev] [PATCH v3 1/2] f2fs: Rename f2fs_unlink exit label

2025-11-04 Thread Nikola Z. Ivanov
Rename "fail" label to "out" as it's used as a default exit path out of f2fs_unlink as well as error path. Signed-off-by: Nikola Z. Ivanov --- fs/f2fs/namei.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/fs/f2fs/namei.c b/fs/f2fs/namei.c index b882771e4699..

[f2fs-dev] [PATCH v3 2/2] f2fs: Add sanity checks before unlinking and loading inodes

2025-11-04 Thread Nikola Z. Ivanov
Add check for inode->i_nlink == 1 for directories during unlink, as their value is decremented twice, which can trigger a warning in drop_nlink. In such case mark the filesystem as corrupted and return from the function call with the relevant failure return value. Additionally add the check for i_