* [PATCH 0/2] reduce directory scans during file creation
@ 2026-06-10 13:36 Yang Wen
0 siblings, 0 replies; only message in thread
From: Yang Wen @ 2026-06-10 13:36 UTC (permalink / raw)
To: linkinjeon, sj1557.seo; +Cc: yuezhang.mo, linux-fsdevel, linux-kernel, Yang Wen
Creating files in a large exfat directory may require repeated linear
directory scans.
First, a negative dentry obtained by an existence check is currently
invalidated for LOOKUP_CREATE. The subsequent create operation therefore
looks up the same name again, even though exfat does not generate FAT-style
8.3 aliases.
Second, after an empty-entry hint is used successfully, the remaining
contiguous empty entries are not retained for the next create operation.
This can cause subsequent operations to rediscover available directory
space.
This series makes the following changes:
1. Reuse a valid negative dentry for LOOKUP_CREATE when the parent
directory version has not changed.
2. Advance and preserve the empty-entry hint after directory entries
have been allocated.
In a test creating 20,000 files with random names and sizes between 1 KiB
and 4 KiB in one directory, the elapsed time changed as follows:
Before: 3879 seconds
After: 3050 seconds
Yang Wen (2):
exfat: reuse valid negative dentries for file creation
preserve the next empty-entry hint after allocation
fs/exfat/namei.c | 56 ++++++++++++++++++++++++++++++++++++++++--------
1 file changed, 47 insertions(+), 9 deletions(-)
--
2.34.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-06-10 13:37 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-10 13:36 [PATCH 0/2] reduce directory scans during file creation Yang Wen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®