Re: [PATCH v4 2/3] exfat: retain the next empty directory entry hint

From: Namjae Jeon

Date: Tue Sep 15 2026 - 11:28:58 EST


> @@ -1489,7 +1491,10 @@ int exfat_write_volume_label(struct super_block *sb,
> goto unlock;
> }
>
> - ret = exfat_find_empty_entry(root_inode, &clu, 1, &es);
> + ret = exfat_find_empty_entry(root_inode, &clu, 1, &es,
> + &next_hint);
> + if (!ret)
It should be if (ret >= 0) ?

> + entry_allocated = true;
> }
>
> +static void exfat_set_next_empty_hint(struct inode *inode,
> + struct exfat_chain *p_dir, int dentry,
> + int num_entries,
> + struct exfat_entry_set_cache *es,
> + struct exfat_hint_femp *hint_femp)
> +{
Please check whether smaller holes can be skipped. For example, if
there is a 3 entry hole near the beginning and a 4 entry name is
appended, a subsequent 3entry name may skip the existing hole because
the Bloom filter miss bypasses the name scan and allocation starts
from the saved hint. Unless another deletion occurs, could this state
persist and cause the directory to grow unnecessarily?

And please create the patches against #dev branch.
Thanks.