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

2025-08-05 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] [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 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

[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] [PATCH 2/2] f2fs: add sysfs entry for effective lookup mode

2025-08-03 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 1/2] f2fs: add lookup_mode mount option

2025-08-03 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] [PATCH] mkfs.f2fs: Fix zoned alignment check for multi-device setups

2025-07-24 Thread Daniel Lee via Linux-f2fs-devel
Commit 84447ee7212e correctly relocated the zone alignment check to its proper location. However, this revealed that the original check's condition was incorrect for multi-device setups. This patch corrects the logic to check the alignment relative to the start of the segment0 and improves the err

[f2fs-dev] [PATCH] f2fs_io: fix format mismatch for ino_t

2025-07-17 Thread Daniel Lee via Linux-f2fs-devel
The ino_t type can be defined as either 'unsigned long' or 'unsigned long long'. Signed-off-by: Daniel Lee --- tools/f2fs_io/f2fs_io.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/f2fs_io/f2fs_io.c b/tools/f2fs_io/f2fs_io.c index 8e81ba9..595d1e6 100644 --- a/too

[f2fs-dev] [PATCH] man: add doc for test_create_perf/test_lookup_perf

2025-07-14 Thread Daniel Lee via Linux-f2fs-devel
Signed-off-by: Daniel Lee --- man/f2fs_io.8 | 22 ++ 1 file changed, 22 insertions(+) diff --git a/man/f2fs_io.8 b/man/f2fs_io.8 index e0f659e..6f3e11e 100644 --- a/man/f2fs_io.8 +++ b/man/f2fs_io.8 @@ -184,6 +184,28 @@ Get i_advise value and info in file .TP \fBioprio\fR \

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

2025-06-30 Thread Daniel Lee via Linux-f2fs-devel
On Mon, Jun 16, 2025 at 5:41 AM Chao Yu wrote: > > On 6/15/25 22:42, Daniel Lee wrote: > > 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 >

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

2025-06-30 Thread Daniel Lee via Linux-f2fs-devel
On Mon, Jun 16, 2025 at 5:50 AM Chao Yu wrote: > > On 6/15/25 22:42, Daniel Lee wrote: > > 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/f2

[f2fs-dev] [PATCH v3] f2fs_io: add test_create_perf command

2025-06-17 Thread Daniel Lee via Linux-f2fs-devel
A new command 'test_create_perf', has been introduced to measure the performance of creating and deleting many files. Signed-off-by: Daniel Lee --- v3: make sync optional for deletion phase v2: Rename command and make fsync optional --- tools/f2fs_io/f2fs_io.c | 146 +

Re: [f2fs-dev] [PATCH v2] f2fs_io: add test_create_perf command

2025-06-17 Thread Daniel Lee via Linux-f2fs-devel
On Tue, Jun 17, 2025 at 2:33 PM Chao Yu wrote: > > On 6/14/25 07:05, Daniel Lee wrote: > > A new command 'test_create_perf', has been introduced to measure > > the performance of creating and deleting many files. > > > > Signed-off-by: Daniel Lee > > --- > > v2: Rename command and make fsync opti

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

2025-06-15 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. --- Changes in v2: - f2

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

2025-06-15 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 | 19 +++ fs/f2fs/file.c | 3 +++ fs/f2fs/namei.c | 11 +++ 3 files changed, 29 ins

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

2025-06-15 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

[f2fs-dev] [PATCH v2] f2fs_io: add test_create_perf command

2025-06-13 Thread Daniel Lee via Linux-f2fs-devel
A new command 'test_create_perf', has been introduced to measure the performance of creating and deleting many files. Signed-off-by: Daniel Lee --- v2: Rename command and make fsync optional --- tools/f2fs_io/f2fs_io.c | 139 1 file changed, 139 insertion

[f2fs-dev] [PATCH] f2fs_io: add create_speed command

2025-06-12 Thread Daniel Lee via Linux-f2fs-devel
A new command 'create_speed', has been introduced to measure the performance of creating and deleting many files. Signed-off-by: Daniel Lee --- tools/f2fs_io/f2fs_io.c | 112 1 file changed, 112 insertions(+) diff --git a/tools/f2fs_io/f2fs_io.c b/tools/

[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 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 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] f2fs: support to disable linear lookup fallback

2025-04-04 Thread Daniel Lee via Linux-f2fs-devel
On Sun, Mar 30, 2025 at 7:54 PM Chao Yu wrote: > > After commit 91b587ba79e1 ("f2fs: Introduce linear search for > dentries"), f2fs forced to use linear lookup whenever a hash-based > lookup fails on casefolded directory, it may affect performance > for scenarios: a) create a new file w/ filename

[f2fs-dev] [PATCH v3] f2fs: Introduce linear search for dentries

2024-12-20 Thread Daniel Lee via Linux-f2fs-devel
This patch addresses an issue where some files in case-insensitive directories become inaccessible due to changes in how the kernel function, utf8_casefold(), generates case-folded strings from the commit 5c26d2f1d3f5 ("unicode: Don't special case ignorable code points"). F2FS uses these case-fold

[f2fs-dev] [PATCH v2] f2fs: Introduce linear search for dentries

2024-12-20 Thread Daniel Lee via Linux-f2fs-devel
This patch addresses an issue where some files in case-insensitive directories become inaccessible due to changes in how the kernel function, utf8_casefold(), generates case-folded strings from the commit 5c26d2f1d3f5 ("unicode: Don't special case ignorable code points"). F2FS uses these case-fold

Re: [f2fs-dev] [PATCH] f2fs: Introduce linear search for dentries

2024-12-20 Thread Daniel Lee via Linux-f2fs-devel
On Fri, Dec 20, 2024 at 5:25 AM Chao Yu wrote: > > On 2024/12/20 12:59, Daniel Lee wrote: > > On Thu, Dec 19, 2024 at 5:29 AM Chao Yu wrote: > >> > >> Hi Daniel, > >> > >> On 2024/12/17 15:55, Daniel Lee wrote: > >>> This patch addresses an issue where some files in case-insensitive > >>> directo

Re: [f2fs-dev] [PATCH] f2fs: Introduce linear search for dentries

2024-12-19 Thread Daniel Lee via Linux-f2fs-devel
On Thu, Dec 19, 2024 at 5:29 AM Chao Yu wrote: > > Hi Daniel, > > On 2024/12/17 15:55, Daniel Lee wrote: > > This patch addresses an issue where some files in case-insensitive > > directories become inaccessible due to changes in how the kernel function, > > utf8_casefold(), generates case-folded

[f2fs-dev] [PATCH] f2fs: Introduce linear search for dentries

2024-12-17 Thread Daniel Lee via Linux-f2fs-devel
This patch addresses an issue where some files in case-insensitive directories become inaccessible due to changes in how the kernel function, utf8_casefold(), generates case-folded strings from the commit 5c26d2f1d3f5 ("unicode: Don't special case ignorable code points"). F2FS uses these case-fold

[f2fs-dev] [PATCH] f2fs: Introduce linear search for dentries

2024-12-17 Thread Daniel Lee via Linux-f2fs-devel
This patch addresses an issue where some files in case-insensitive directories become inaccessible due to changes in how the kernel function, utf8_casefold(), generates case-folded strings from the commit 5c26d2f1d3f5 ("unicode: Don't special case ignorable code points"). F2FS uses these case-fold