All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <djwong@kernel.org>
To: Christoph Hellwig <hch@infradead.org>
Cc: linux-xfs@vger.kernel.org
Subject: Re: [PATCH 1/3] xfs: make xfs_rtalloc_query_range input parameters const
Date: Thu, 12 Aug 2021 08:07:39 -0700	[thread overview]
Message-ID: <20210812150739.GN3601443@magnolia> (raw)
In-Reply-To: <YRTcKcK1z430Y+Lg@infradead.org>

On Thu, Aug 12, 2021 at 09:30:33AM +0100, Christoph Hellwig wrote:
> On Wed, Aug 11, 2021 at 05:58:42PM -0700, Darrick J. Wong wrote:
> > From: Darrick J. Wong <djwong@kernel.org>
> > 
> > In commit 8ad560d2565e, we changed xfs_rtalloc_query_range to constrain
> > the range of bits in the realtime bitmap file that would actually be
> > searched.  In commit a3a374bf1889, we changed the range again
> > (incorrectly), leading to the fix in commit d88850bd5516, which finally
> > corrected the range check code.  Unfortunately, the author never noticed
> > that the function modifies its input parameters, which is a totaly no-no
> > since none of the other range query functions change their input
> > parameters.
> > 
> > So, fix this function yet again to stash the upper end of the query
> > range (i.e. the high key) in a local variable and hope this is the last
> > time I have to fix my own function.  While we're at it, mark the key
> > inputs const so nobody makes this mistake again. :(
> 
> Heh.
> 
> Looks good:
> 
> Reviewed-by: Christoph Hellwig <hch@lst.de>
> 
> > Not-fixed-by: a3a374bf1889 ("xfs: fix off-by-one error in xfs_rtalloc_query_range")
> > Not-fixed-by: d88850bd5516 ("xfs: fix high key handling in the rt allocator's query_range function")
> 
> Are these tags a thing now or is this just a grumpy Darrick?

Just grumpy me.  If you click on the commits in gitk you can see the
long stream of me trying to wrap his head around the weirdness of
rtbitmap. :/

Thanks for the review though. :)

--D

  reply	other threads:[~2021-08-12 15:07 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-12  0:58 [PATCHSET 0/3] xfs: fix various bugs in fsmap Darrick J. Wong
2021-08-12  0:58 ` [PATCH 1/3] xfs: make xfs_rtalloc_query_range input parameters const Darrick J. Wong
2021-08-12  8:30   ` Christoph Hellwig
2021-08-12 15:07     ` Darrick J. Wong [this message]
2021-08-13  9:56   ` Chandan Babu R
2021-08-12  0:58 ` [PATCH 2/3] xfs: fix off-by-one error when the last rt extent is in use Darrick J. Wong
2021-08-12  8:36   ` Christoph Hellwig
2021-08-12 16:24     ` Darrick J. Wong
2021-08-13 10:50   ` Chandan Babu R
2021-08-13 16:16     ` Darrick J. Wong
2021-08-12  0:58 ` [PATCH 3/3] xfs: make fsmap backend function key parameters const Darrick J. Wong
2021-08-12  8:40   ` Christoph Hellwig
2021-08-13 11:03   ` Chandan Babu R

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=20210812150739.GN3601443@magnolia \
    --to=djwong@kernel.org \
    --cc=hch@infradead.org \
    --cc=linux-xfs@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.