public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: Shida Zhang <starzhangzsd@gmail.com>
Cc: djwong@kernel.org, zhangshida@kylinos.cn,
	linux-kernel@vger.kernel.org, linux-xfs@vger.kernel.org
Subject: Re: [PATCH] xfs: return when delta equals 0 in xfs_mod_freecounter
Date: Tue, 21 Jun 2022 14:35:50 +1000	[thread overview]
Message-ID: <20220621043550.GP227878@dread.disaster.area> (raw)
In-Reply-To: <20220621031113.1222877-1-zhangshida@kylinos.cn>

On Tue, Jun 21, 2022 at 11:11:13AM +0800, Shida Zhang wrote:
> There are cases that xfs_mod_freecounter() will get called when delta
> equals 0 while it's unnecessary.

AFAICT all of the call paths are guarded by checks to ensure the
delta is, in fact, not zero. i.e. if the delta is zero, we shouldn't
be calling xfs_mod_fdblocks() or xfs_mod_frextents() at all.

Can you explain in more detail what code path leads to delta = 0
here?

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

  reply	other threads:[~2022-06-21  4:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-21  3:11 [PATCH] xfs: return when delta equals 0 in xfs_mod_freecounter Shida Zhang
2022-06-21  4:35 ` Dave Chinner [this message]
2022-06-21  7:04   ` Stephen Zhang

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=20220621043550.GP227878@dread.disaster.area \
    --to=david@fromorbit.com \
    --cc=djwong@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    --cc=starzhangzsd@gmail.com \
    --cc=zhangshida@kylinos.cn \
    /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