mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Yang Wen <anmuxixixi@gmail.com>
To: linkinjeon@kernel.org
Cc: anmuxixixi@gmail.com, chizhiling@163.com, exfat@lists.linux.dev,
	linux-kernel@vger.kernel.org, sj1557.seo@samsung.com,
	yuezhang.mo@sony.com
Subject: Re: [PATCH v4 2/3] exfat: retain the next empty directory entry hint
Date: Sat, 19 Sep 2026 23:37:34 +0800	[thread overview]
Message-ID: <20260919153734.1511310-1-anmuxixixi@gmail.com> (raw)
In-Reply-To: <CAKYAXd9pPRi21V_t_h0FSQyU7mN6u3o8wUc8=pusU8fDSMA5JA@mail.gmail.com>

Hi,

Thank you for the careful review and for pointing out these issues.

> > @@ -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) ?
exfat_find_empty_entry() returns a non-negative entry index on success.
I have changed the volume-label path to use 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?
The smaller-hole example is also valid. A Bloom-filter miss can skip the
name scan that would otherwise rediscover an earlier hole, while the saved
hint points past it. In v5, the hint records the entry-set size that
justified advancing it. If a later request needs fewer entries, allocation
discards the hint and searches from the beginning. I have also kept the
hint invalidation on paths that free entries.

> And please create the patches against #dev branch.
I have rebased the series on the exFAT dev branch.

Thanks again.

  reply	other threads:[~2026-09-19 15:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-13 14:23 [PATCH v4 0/3] exfat: speed up file creation in large directories Yang Wen
2026-09-13 14:23 ` [PATCH v4 1/3] exfat: add a Bloom filter for negative name lookups Yang Wen
2026-09-13 14:23 ` [PATCH v4 2/3] exfat: retain the next empty directory entry hint Yang Wen
2026-09-15 14:29   ` Namjae Jeon
2026-09-19 15:37     ` Yang Wen [this message]
2026-09-13 14:23 ` [PATCH v4 3/3] exfat: reclaim name filters under memory pressure Yang Wen

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=20260919153734.1511310-1-anmuxixixi@gmail.com \
    --to=anmuxixixi@gmail.com \
    --cc=chizhiling@163.com \
    --cc=exfat@lists.linux.dev \
    --cc=linkinjeon@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®