[f2fs-dev] [PATCH v3 2/2] f2fs: add sysfs entry for effective lookup mode

2025-08-04 Thread Daniel Lee via Linux-f2fs-devel
This commit introduces a new read-only sysfs entry at /sys/fs/f2fs//effective_lookup_mode. This entry displays the actual directory lookup mode F2FS is currently using. This is needed for debugging and verification, as the behavior is determined by both on-disk flags and mount options. Signed-off

[f2fs-dev] [PATCH v3 2/3] f2fs: fix to zero data after EOF for compressed file correctly

2025-08-04 Thread Chao Yu via Linux-f2fs-devel
generic/091 may fail, then it bisects to the bad commit ba8dac350faf ("f2fs: fix to zero post-eof page"). What will cause generic/091 to fail is something like below Testcase #1: 1. write 16k as compressed blocks 2. truncate to 12k 3. truncate to 20k 4. verify data in range of [12k, 16k], however

[f2fs-dev] [PATCH v3 3/3] f2fs: clean up f2fs_truncate_partial_cluster()

2025-08-04 Thread Chao Yu via Linux-f2fs-devel
Clean up codes as below: - avoid unnecessary "err > 0" check condition - use "1 << log_cluster_size" instead of F2FS_I(inode)->i_cluster_size No logic changes. Signed-off-by: Chao Yu --- v3: - reorder patch 2 and patch 3 fs/f2fs/compress.c | 42 +++--- 1 file

[f2fs-dev] [PATCH v3 1/3] f2fs: fix to avoid overflow while left shift operation

2025-08-04 Thread Chao Yu via Linux-f2fs-devel
Should cast type of folio->index from pgoff_t to loff_t to avoid overflow while left shift operation. Fixes: 3265d3db1f16 ("f2fs: support partial truncation on compressed inode") Signed-off-by: Chao Yu --- fs/f2fs/compress.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/

Re: [f2fs-dev] [PATCH v2 1/2] f2fs: add lookup_mode mount option

2025-08-04 Thread Chao Yu via Linux-f2fs-devel
On 8/5/25 07:05, Daniel Lee wrote: > For casefolded directories, f2fs may fall back to a linear search if > a hash-based lookup fails. This can cause severe performance > regressions. > > While this behavior can be controlled by userspace tools (e.g. mkfs, > fsck) by setting an on-disk flag, a ker

[f2fs-dev] [PATCH v2] f2fs: fix to return -EOPNOTSUPP for uncached write

2025-08-04 Thread Chao Yu via Linux-f2fs-devel
f2fs doesn't support uncached write yet, for write() w/ IOCB_DONTCACHE flag, let's return -EOPNOTSUPP instead of ignoring IOCB_DONTCACHE flag and write w/o uncached IO. Cc: Jens Axboe Cc: Qi Han Signed-off-by: Chao Yu --- v2: - fix author info fs/f2fs/file.c | 5 + 1 file changed, 5 insert

[f2fs-dev] [PATCH] f2fs: fix to return -EOPNOTSUPP for uncached write

2025-08-04 Thread Chao Yu via Linux-f2fs-devel
f2fs doesn't support uncached write yet, for write() w/ IOCB_DONTCACHE flag, let's return -EOPNOTSUPP instead of ignoring IOCB_DONTCACHE flag and write w/o uncached IO. Cc: Jens Axboe Cc: Qi Han Signed-off-by: Chao Yu --- v2: - fix author info fs/f2fs/file.c | 5 + 1 file changed, 5 insert

Re: [f2fs-dev] [PATCH] Fix build error in Android

2025-08-04 Thread Chao Yu via Linux-f2fs-devel
On 8/2/25 00:13, Jaegeuk Kim via Linux-f2fs-devel wrote: > external/f2fs-tools/mkfs/f2fs_format.c:392:31: error: format specifies type > 'unsigned long long' but the argument has type 'size_t' (aka 'unsigned int') > [-Werror,-Wformat] > 391 | MSG(1, "\tError: Unaligned s

Re: [f2fs-dev] [PATCH v2 3/3] f2fs: fix to zero data after EOF for compressed file correctly

2025-08-04 Thread Jaegeuk Kim via Linux-f2fs-devel
Chao, it seems you made a clean up before this? Can you post it first? On 08/04, Chao Yu wrote: > generic/091 may fail, then it bisects to the bad commit ba8dac350faf > ("f2fs: fix to zero post-eof page"). > > What will cause generic/091 to fail is something like below Testcase #1: > 1. write 16k

Re: [f2fs-dev] [PATCH v2 3/3] f2fs: fix to zero data after EOF for compressed file correctly

2025-08-04 Thread Chao Yu via Linux-f2fs-devel
Jaegeuk, sure, let me change the order. On 8/5/25 10:42, Jaegeuk Kim wrote: > Chao, it seems you made a clean up before this? Can you post it first? > > On 08/04, Chao Yu wrote: >> generic/091 may fail, then it bisects to the bad commit ba8dac350faf >> ("f2fs: fix to zero post-eof page"). >> >> W

Re: [f2fs-dev] [PATCH v4] f2fs: add reserved nodes for privileged users

2025-08-04 Thread Jaegeuk Kim via Linux-f2fs-devel
On 07/31, Chunhai Guo wrote: > 在 7/31/2025 4:46 PM, Chao Yu 写道: > > On 7/31/25 15:57, Chunhai Guo wrote: > >> This patch allows privileged users to reserve nodes via the > >> 'reserve_node' mount option, which is similar to the existing > >> 'reserve_root' option. > >> > >> "-o reserve_node=" means

[f2fs-dev] [PATCH v2 2/2] f2fs: add sysfs entry for effective lookup mode

2025-08-04 Thread Daniel Lee via Linux-f2fs-devel
This commit introduces a new read-only sysfs entry at /sys/fs/f2fs//effective_lookup_mode. This entry displays the actual directory lookup mode F2FS is currently using. This is needed for debugging and verification, as the behavior is determined by both on-disk flags and mount options. Signed-off

Re: [f2fs-dev] [PATCH] f2fs: f2fs supports uncached buffered I/O read

2025-08-04 Thread Chao Yu via Linux-f2fs-devel
On 8/2/25 23:35, Jens Axboe wrote: > On 7/30/25 8:35 PM, Chao Yu wrote: >> On 7/30/25 23:20, Jens Axboe wrote: >>> On 7/28/25 2:28 AM, hanqi wrote: ? 2025/7/28 16:07, Chao Yu ??: > On 7/28/25 16:03, hanqi wrote: >> ? 2025/7/28 15:38, Chao Yu ??: >> >>> On 7/25/25 15:53, Qi Han

Re: [f2fs-dev] [GIT PULL] f2fs for 6.17-rc1

2025-08-04 Thread pr-tracker-bot--- via Linux-f2fs-devel
The pull request you sent on Mon, 4 Aug 2025 21:40:02 +: > git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git > tags/f2fs-for-6.17-rc1 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/0974f486f3dde9df1ad979d4ff341dc9c2d545f5 Thank you! -- Deet-doot-do

[f2fs-dev] [PATCH v2 1/2] f2fs: add lookup_mode mount option

2025-08-04 Thread Daniel Lee via Linux-f2fs-devel
For casefolded directories, f2fs may fall back to a linear search if a hash-based lookup fails. This can cause severe performance regressions. While this behavior can be controlled by userspace tools (e.g. mkfs, fsck) by setting an on-disk flag, a kernel-level solution is needed to guarantee the l

[f2fs-dev] [GIT PULL] f2fs for 6.17-rc1

2025-08-04 Thread Jaegeuk Kim via Linux-f2fs-devel
Hi Linus, Could you please consider this pull request? Thanks, The following changes since commit 78f4e737a53e1163ded2687a922fce138aee73f5: Merge tag 'for-6.16/dm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm (2025-06-23 15:02:57 -0700) are available in the

[f2fs-dev] [PATCH] f2fs: fix CURSEG_HOT_DATA left space check

2025-08-04 Thread mason.zhang
This fix combines the space check for data_blocks and dent_blocks when verifying HOT_DATA segment capacity, preventing potential insufficient space issues during checkpoint. Signed-off-by: mason.zhang --- fs/f2fs/segment.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/f2

[f2fs-dev] [PATCH v3 2/3] f2fs/016: test special mount options

2025-08-04 Thread Chao Yu via Linux-f2fs-devel
As f2fs changes to use new mount APIs, let's add a new testcase to check mount result for all f2fs supported special mount options and their combinations, in order to detect any inconsistency during mount. Cc: Jaegeuk Kim Signed-off-by: Chao Yu --- tests/f2fs/016 | 50 ++

[f2fs-dev] [PATCH v3 3/3] f2fs/017: test mount options for zoned device

2025-08-04 Thread Chao Yu via Linux-f2fs-devel
As f2fs changes to use new mount APIs, let's add a new testcase to check mount result for special mount options for zoned device and their combinations, in order to detect any inconsistency during mount. Cc: Jaegeuk Kim Signed-off-by: Chao Yu --- tests/f2fs/017 | 40

[f2fs-dev] [PATCH v3 1/3] f2fs/015: test common mount options

2025-08-04 Thread Chao Yu via Linux-f2fs-devel
As f2fs changes to use new mount APIs, let's add a new testcase to check mount result for all f2fs supported common mount options and their combinations, in order to detect any inconsistency during mount. Cc: Jaegeuk Kim Signed-off-by: Chao Yu --- common/rc | 3 + tests/f2fs/015