From: Namjae Jeon <linkinjeon@kernel.org>
To: Yang Wen <anmuxixixi@gmail.com>
Cc: sj1557.seo@samsung.com, chizhiling@163.com, yuezhang.mo@sony.com,
exfat@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 2/3] exfat: retain the next empty directory entry hint
Date: Fri, 11 Sep 2026 09:02:58 +0900 [thread overview]
Message-ID: <CAKYAXd-O2q3aYowcJfTuvueHPsdGYme3jaeCZjqx=bpPfrDNGg@mail.gmail.com> (raw)
In-Reply-To: <20260902152455.1273557-3-anmuxixixi@gmail.com>
> @@ -385,6 +429,8 @@ int exfat_find_empty_entry(struct inode *inode,
> inode->i_blocks += sbi->cluster_size >> 9;
> }
>
> + exfat_set_next_empty_hint(inode, p_dir, dentry, num_entries, es);
This advances hint_femp before the entry set is committed. If a later
step such as exfat_alloc_new_dir() or exfat_put_dentry_set() fails,
the slot is still empty but the hint points past it. The same applies
to the volume-label and rollback paths. Please invalidate the hint on
every post-allocation failure, or update it only after the entry is
committed.
> +
> p_dir->dir = exfat_sector_to_cluster(sbi, es->bh[0]->b_blocknr);
> p_dir->size -= dentry / sbi->dentries_per_clu;
>
> @@ -1214,6 +1267,7 @@ static int __exfat_rename(struct inode *old_parent_inode,
> ret = exfat_rename_file(new_parent_inode, &uni_name, ei);
> else
> ret = exfat_move_file(new_parent_inode, &uni_name, ei);
> + exfat_invalidate_empty_hint(old_parent_inode);
> if (!ret)
> exfat_name_filter_add(new_parent_inode, &uni_name);
If the new entry is written successfully but deleting the old entry
fails, exfat_rename_file() or exfat_move_file() returns an error and
this filter update is skipped. The new name may still exist on disk,
so a Bloom-filter miss can incorrectly return -ENOENT. Please
invalidate the destination filter on rename/move errors.
Thanks.
next prev parent reply other threads:[~2026-09-11 0:03 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-02 15:24 [PATCH v3 0/3] exfat: speed up file creation in large directories Yang Wen
2026-09-02 15:24 ` [PATCH v3 1/3] exfat: add a Bloom filter for negative name lookups Yang Wen
2026-10-19 0:27 ` NeilBrown
2026-09-02 15:24 ` [PATCH v3 2/3] exfat: retain the next empty directory entry hint Yang Wen
2026-09-11 0:02 ` Namjae Jeon [this message]
2026-09-02 15:24 ` [PATCH v3 3/3] exfat: reclaim name filters under memory pressure Yang Wen
2026-09-03 8:41 ` [PATCH v3 0/3] exfat: speed up file creation in large directories Chi Zhiling
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='CAKYAXd-O2q3aYowcJfTuvueHPsdGYme3jaeCZjqx=bpPfrDNGg@mail.gmail.com' \
--to=linkinjeon@kernel.org \
--cc=anmuxixixi@gmail.com \
--cc=chizhiling@163.com \
--cc=exfat@lists.linux.dev \
--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®