public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Brian Foster <bfoster@redhat.com>
Cc: xiakaixu1987@gmail.com, linux-xfs@vger.kernel.org,
	darrick.wong@oracle.com, Kaixu Xia <kaixuxia@tencent.com>
Subject: Re: [PATCH 1/3] xfs: directly return if the delta equal to zero
Date: Wed, 23 Sep 2020 08:01:37 +0100	[thread overview]
Message-ID: <20200923070137.GA25798@infradead.org> (raw)
In-Reply-To: <20200922174347.GG2175303@bfoster>

On Tue, Sep 22, 2020 at 01:43:47PM -0400, Brian Foster wrote:
> This does slightly change behavior in that this function currently
> unconditionally results in logging the associated dquot in the
> transaction. I'm not sure anything really depends on that with a delta
> == 0, but it might be worth documenting in the commit log.
> 
> Also, it does seem a little odd to bail out after we've potentially
> allocated ->t_dqinfo as well as assigned the current dquot a slot in the
> transaction. I think that means the effect of this change is lost if
> another dquot happens to be modified (with delta != 0) in the same
> transaction (which might also be an odd thing to do).

Yes, it seems like we should probably bail out at the very beginning for
delta == 0, and document what kind of changes this theoretically causes,
and why they don't matter.

Btw, the function could really use a reindent, the formatting is very
strange.

  parent reply	other threads:[~2020-09-23  7:01 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-22  9:03 [RFC PATCH 0/3]xfs: random fixes for disk quota xiakaixu1987
2020-09-22  9:04 ` [PATCH 1/3] xfs: directly return if the delta equal to zero xiakaixu1987
2020-09-22 16:19   ` Darrick J. Wong
2020-09-22 17:43   ` Brian Foster
2020-09-23  2:42     ` kaixuxia
2020-09-23 13:27       ` Brian Foster
2020-09-23 16:09         ` Darrick J. Wong
2020-09-23  7:01     ` Christoph Hellwig [this message]
2020-09-22  9:04 ` [PATCH 2/3] xfs: remove the unused parameter id from xfs_qm_dqattach_one xiakaixu1987
2020-09-22 16:20   ` Darrick J. Wong
2020-09-23  7:02   ` Christoph Hellwig
2020-09-22  9:04 ` [PATCH 3/3] xfs: only do dqget or dqhold for the specified dquots xiakaixu1987
2020-09-22 16:18   ` Darrick J. Wong
2020-09-23  3:11     ` kaixuxia
2020-09-23 16:30 ` [RFC PATCH 0/3]xfs: random fixes for disk quota Darrick J. Wong

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=20200923070137.GA25798@infradead.org \
    --to=hch@infradead.org \
    --cc=bfoster@redhat.com \
    --cc=darrick.wong@oracle.com \
    --cc=kaixuxia@tencent.com \
    --cc=linux-xfs@vger.kernel.org \
    --cc=xiakaixu1987@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