From: Yang Wen <anmuxixixi@gmail.com>
To: linkinjeon@kernel.org, sj1557.seo@samsung.com
Cc: yuezhang.mo@sony.com, linux-fsdevel@vger.kernel.org,
linux-kernel@vger.kernel.org, Yang Wen <anmuxixixi@gmail.com>
Subject: [PATCH 0/2] reduce directory scans during file creation
Date: Wed, 10 Jun 2026 21:36:56 +0800 [thread overview]
Message-ID: <20260610133658.196180-1-anmuxixixi@gmail.com> (raw)
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
reply other threads:[~2026-06-10 13:37 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260610133658.196180-1-anmuxixixi@gmail.com \
--to=anmuxixixi@gmail.com \
--cc=linkinjeon@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sj1557.seo@samsung.com \
--cc=yuezhang.mo@sony.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®