[f2fs-dev] [PATCH] f2fs: fix to avoid invalid wait context issue

2025-06-11 Thread Chao Yu via Linux-f2fs-devel
= [ BUG: Invalid wait context ] 6.13.0-rc1 #84 Tainted: G O - cat/56160 is trying to lock: 888105c86648 (&cprc->stat_lock){+.+.}-{3:3}, at: update_general_status+0x32a/0x8c0 [f2fs] other info that might help us debug this: conte

Re: [f2fs-dev] [PATCH v3] f2fs: compress: fix UAF of f2fs_inode_info in f2fs_free_dic

2025-06-11 Thread Chao Yu via Linux-f2fs-devel
On 6/11/25 15:51, Zhiguo Niu wrote: > Zhiguo Niu 于2025年6月11日周三 14:52写道: >> >> Chao Yu 于2025年6月11日周三 14:47写道: >>> >>> On 6/11/25 14:41, Zhiguo Niu wrote: Chao Yu 于2025年6月11日周三 14:07写道: > > On 6/11/25 00:08, Jaegeuk Kim wrote: >> Hi Zhiguo, >> >> This patch causes CPU hang

Re: [f2fs-dev] [RFC PATCH v2 02/32] f2fs-tools: add option N to answer no for all questions

2025-06-11 Thread Chao Yu via Linux-f2fs-devel
On 6/10/25 20:37, Sheng Yong wrote: > From: Sheng Yong > > In some scenario, such as autotest, it is not expected to answer > question from fsck or dump. To simply answer no to all these questions, > this patch adds an option `N' to do that. > > Signed-off-by: Sheng Yong > --- > fsck/dump.c

Re: [f2fs-dev] [RFC PATCH v2 07/32] inject.f2fs: fix injecting sit/nat in journal

2025-06-11 Thread Chao Yu via Linux-f2fs-devel
On 6/10/25 20:37, Sheng Yong wrote: > From: Sheng Yong > > Previously when injecting sit/nat entry, we only inject SIT/NAT pack. > If the valid target is in journal, the injection has no effect. So we > have to check whether the valid target is in journal, and inject the > target at its valid pos

[f2fs-dev] [PATCH] fscrypt: don't use hardware offload Crypto API drivers

2025-06-11 Thread Eric Biggers via Linux-f2fs-devel
From: Eric Biggers fscrypt has never properly supported the old-school Crypto API hardware offload drivers, as it processes each request synchronously. There was one report of someone successfully using such a driver 8 years ago. But otherwise this style of hardware offload is basically obsolet

[f2fs-dev] [PATCH 0/2] f2fs: Fix DIO flags and add ioprio hint

2025-06-11 Thread Daniel Lee via Linux-f2fs-devel
The first patch corrects an issue where Direct I/O (DIO) writes ignore bio flag hints (e.g., F2FS_IOPRIO_WRITE for REQ_PRIO), making them inconsistent with buffered I/O. The second patch is to set an I/O priority hint for hot files on creation and pinned files by default. Daniel Lee (2): f2fs:

[f2fs-dev] [PATCH 2/2] f2fs: use ioprio hint for hot and pinned files

2025-06-11 Thread Daniel Lee via Linux-f2fs-devel
Apply the `ioprio_hint` to set `F2FS_IOPRIO_WRITE` priority on files identified as "hot" at creation and on files that are pinned via ioctl. Signed-off-by: Daniel Lee --- fs/f2fs/f2fs.h | 21 + fs/f2fs/file.c | 3 +++ fs/f2fs/namei.c | 11 +++ 3 files changed, 31 i

[f2fs-dev] [PATCH 1/2] f2fs: Apply bio flags to direct I/O

2025-06-11 Thread Daniel Lee via Linux-f2fs-devel
Bio flags like REQ_PRIO, REQ_META, and REQ_FUA, determined by f2fs_io_flags(), were not being applied to direct I/O (DIO) writes. This meant that DIO writes would not respect filesystem-level hints (for REQ_META/FUA) or inode-level hints (like F2FS_IOPRIO_WRITE). This patch refactors f2fs_io_flags

Re: [f2fs-dev] [PATCH] fscrypt: don't use hardware offload Crypto API drivers

2025-06-11 Thread Simon Richter
Hi, On 6/12/25 05:58, Eric Biggers wrote: But otherwise this style of hardware offload is basically obsolete and has been superseded by hardware-accelerated crypto instructions directly on the CPU as well as inline storage encryption (UFS/eMMC). For desktop, yes, but embedded still has quite

Re: [f2fs-dev] [PATCH] fscrypt: don't use hardware offload Crypto API drivers

2025-06-11 Thread Eric Biggers via Linux-f2fs-devel
On Thu, Jun 12, 2025 at 09:21:26AM +0900, Simon Richter wrote: > Hi, > > On 6/12/25 05:58, Eric Biggers wrote: > > > But > > otherwise this style of hardware offload is basically obsolete and has > > been superseded by hardware-accelerated crypto instructions directly on > > the CPU as well as in

[f2fs-dev] [PATCH] f2fs: continue to allocate pinned section when gc happens EAGAIN

2025-06-11 Thread wangzijie
Wu Bo once mentioned a fallocate fail scenario in this link[1]. After commit 3fdd89b452c2("f2fs: prevent writing without fallocate() for pinned files"), we cannot directly generate 4K size file and pin it, but we can still generate non-segment aligned pinned file: touch test_file ./f2fs_io pinfile

Re: [f2fs-dev] [RFC PATCH v2 02/32] f2fs-tools: add option N to answer no for all questions

2025-06-11 Thread Sheng Yong
On 6/11/25 17:22, Chao Yu wrote: On 6/10/25 20:37, Sheng Yong wrote: From: Sheng Yong In some scenario, such as autotest, it is not expected to answer question from fsck or dump. To simply answer no to all these questions, this patch adds an option `N' to do that. Signed-off-by: Sheng Yong -

Re: [f2fs-dev] [syzbot] [netfs?] kernel BUG in folio_unlock (3)

2025-06-11 Thread Aleksandr Nogikh via Linux-f2fs-devel
On Sun, Jun 1, 2025 at 2:26 AM Matthew Wilcox wrote: > > On Sat, May 31, 2025 at 04:20:02PM -0700, syzbot wrote: > > syzbot has bisected this issue to: > > > > commit 80f31d2a7e5f4efa7150c951268236c670bcb068 > > Author: Christoph Hellwig > > Date: Thu May 8 05:14:32 2025 + > > That's not po

Re: [f2fs-dev] [PATCH 00/13] Parallelizing filesystem writeback

2025-06-11 Thread Darrick J. Wong via Linux-f2fs-devel
On Wed, Jun 04, 2025 at 02:52:34PM +0530, Kundan Kumar wrote: > > > > For xfs used this command: > > > > xfs_io -c "stat" /mnt/testfile > > > > And for ext4 used this: > > > > filefrag /mnt/testfile > > > > > > filefrag merges contiguous extents, and only counts up for discontiguous > > > mappings,

Re: [f2fs-dev] [PATCH v3] f2fs: compress: fix UAF of f2fs_inode_info in f2fs_free_dic

2025-06-11 Thread Zhiguo Niu
Chao Yu 于2025年6月11日周三 14:07写道: > > On 6/11/25 00:08, Jaegeuk Kim wrote: > > Hi Zhiguo, > > > > This patch causes CPU hang when running fsstress on > > compressed/non-compressed > > files. Please check. > > Oh, seems it may cause below deadlock: > > CPU0 > process A > - spin_lock(i_lock) > softwar

Re: [f2fs-dev] [PATCH v3] f2fs: compress: fix UAF of f2fs_inode_info in f2fs_free_dic

2025-06-11 Thread Zhiguo Niu
Zhiguo Niu 于2025年6月11日周三 14:52写道: > > Chao Yu 于2025年6月11日周三 14:47写道: > > > > On 6/11/25 14:41, Zhiguo Niu wrote: > > > Chao Yu 于2025年6月11日周三 14:07写道: > > >> > > >> On 6/11/25 00:08, Jaegeuk Kim wrote: > > >>> Hi Zhiguo, > > >>> > > >>> This patch causes CPU hang when running fsstress on > > >>>

Re: [f2fs-dev] [PATCH] fscrypt: don't use hardware offload Crypto API drivers

2025-06-11 Thread Eric Biggers via Linux-f2fs-devel
On Thu, Jun 12, 2025 at 12:59:14AM +, Eric Biggers wrote: > On Thu, Jun 12, 2025 at 09:21:26AM +0900, Simon Richter wrote: > > Hi, > > > > On 6/12/25 05:58, Eric Biggers wrote: > > > > > But > > > otherwise this style of hardware offload is basically obsolete and has > > > been superseded by