From: "Nirjhar Roy (IBM)" <nirjhar.roy.lists@gmail.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: djwong@kernel.org, cem@kernel.org, linux-xfs@vger.kernel.org,
ritesh.list@gmail.com, ojaswin@linux.ibm.com
Subject: Re: [PATCH v1 2/4] xfs: Update sb_frextents when lazy count is set
Date: Wed, 18 Feb 2026 14:19:21 +0530 [thread overview]
Message-ID: <91050faaf76fc895bbda97689fd7446ad8d4f278.camel@gmail.com> (raw)
In-Reply-To: <aZVUEKzVBn5re9JG@infradead.org>
On Tue, 2026-02-17 at 21:54 -0800, Christoph Hellwig wrote:
> On Thu, Feb 12, 2026 at 07:31:45PM +0530, Nirjhar Roy (IBM) wrote:
> > Since sb_frextents is a lazy counter, update it when lazy count is set,
> > just like sb_icount, sb_ifree and sb_fdblocks.
>
> The comment you removed explains why we need a different conditional
> for it, though.
So I just moved the comment and the updation of sb_frextents from outside of "if
(xfs_has_lazysbcount(mp)) {" to inside of it since sb_frextents is a also a lazy counter like the
sb_fdblocks, sb_ifree. The comment talks about using the positive version of freecounter i.e,
xfs_sum_freecounter(). Do you mean to say that the updation/sync of the sb_frextents should be
outside "if (xfs_has_lazysbcount(mp)) {" i.e, done irrespective of whether lazy count is set or not?
Please let me know if my understanding is wrong.
>
> The commit message also doesn't explain at all:
Okay I can update the commit message
>
> - why you want to change it
How about "We should update all the free counters only if lazy count is set, else it will be
unnecessary work"?
> - what the chane is (AFAICS just the conditional and not how it is
> updated)
How about "Updating sb_frextents conditionally based on whether lazy count it set instead of doing
it unconditionally everytime when xfs_log_sb() is called"?
Does the above 2 look fine?
--NR
next prev parent reply other threads:[~2026-02-18 8:49 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-12 14:01 [PATCH v1 0/4] xfs: Misc changes to XFS realtime Nirjhar Roy (IBM)
2026-02-12 14:01 ` [PATCH v1 1/4] xfs: Fix xfs_last_rt_bmblock() Nirjhar Roy (IBM)
2026-02-18 5:53 ` Christoph Hellwig
2026-02-18 7:47 ` Nirjhar Roy (IBM)
2026-02-12 14:01 ` [PATCH v1 2/4] xfs: Update sb_frextents when lazy count is set Nirjhar Roy (IBM)
2026-02-18 5:54 ` Christoph Hellwig
2026-02-18 8:49 ` Nirjhar Roy (IBM) [this message]
2026-02-19 6:38 ` Christoph Hellwig
2026-02-19 6:46 ` Nirjhar Roy (IBM)
2026-02-19 6:51 ` Christoph Hellwig
2026-02-19 7:05 ` Nirjhar Roy (IBM)
2026-02-19 7:07 ` Christoph Hellwig
2026-02-19 7:09 ` Nirjhar Roy (IBM)
2026-02-12 14:01 ` [PATCH v1 3/4] xfs: Update lazy counters in xfs_growfs_rt_bmblock() Nirjhar Roy (IBM)
2026-02-18 5:55 ` Christoph Hellwig
2026-02-18 7:48 ` Nirjhar Roy (IBM)
2026-02-12 14:01 ` [PATCH v1 4/4] xfs: Add some comments in some macros Nirjhar Roy (IBM)
2026-02-18 5:56 ` Christoph Hellwig
2026-02-18 7:50 ` Nirjhar Roy (IBM)
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=91050faaf76fc895bbda97689fd7446ad8d4f278.camel@gmail.com \
--to=nirjhar.roy.lists@gmail.com \
--cc=cem@kernel.org \
--cc=djwong@kernel.org \
--cc=hch@infradead.org \
--cc=linux-xfs@vger.kernel.org \
--cc=ojaswin@linux.ibm.com \
--cc=ritesh.list@gmail.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