f2fs: add lookup_mode mount option
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 lookup behavior regardless of the on-disk state. This commit introduces the 'lookup_mode' mount option to provide this kernel-side control. The option accepts three values: - perf: (Default) Enforces a hash-only lookup. The linear fallback is always disabled. - compat: Enables the linear search fallback for compatibility with directory entries from older kernels. - auto: Determines the mode based on the on-disk flag, preserving the userspace-based behavior. Signed-off-by:Daniel Lee <chullee@google.com> Reviewed-by:
Chao Yu <chao@kernel.org> Signed-off-by:
Jaegeuk Kim <jaegeuk@kernel.org>
Loading
-
mentioned in commit 34d1a222
-
mentioned in commit 39548fae
-
mentioned in commit ad275ef0
-
mentioned in commit fca84edb
-
mentioned in commit 550f5848
-
mentioned in commit 8c2f3782
-
mentioned in commit 4f8cca03
-
mentioned in commit 981b0cb8
-
mentioned in commit fbf54225
-
mentioned in commit 3c28fdc3
-
mentioned in commit 575c0d3f
-
mentioned in commit 60713380
-
mentioned in commit bb5bde68
Please sign in to comment