public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <djwong@kernel.org>
To: Dave Chinner <david@fromorbit.com>
Cc: linux-xfs@vger.kernel.org
Subject: Re: [PATCH 1/3] xfs: pass explicit mount pointer to rtalloc query functions
Date: Mon, 11 Apr 2022 12:46:20 -0700	[thread overview]
Message-ID: <20220411194620.GA16799@magnolia> (raw)
In-Reply-To: <20220411011725.GQ1544202@dread.disaster.area>

On Mon, Apr 11, 2022 at 11:17:25AM +1000, Dave Chinner wrote:
> On Sun, Apr 10, 2022 at 11:21:00AM -0700, Darrick J. Wong wrote:
> > From: Darrick J. Wong <djwong@kernel.org>
> > 
> > Pass an explicit xfs_mount pointer to the rtalloc query functions so
> > that they can support transactionless queries.
> > 
> > Signed-off-by: Darrick J. Wong <djwong@kernel.org>
> 
> Looks good, minor nit below.
> 
> Reviewed-by: Dave Chinner <dchinner@redhat.com>
> 
> > diff --git a/fs/xfs/xfs_fsmap.c b/fs/xfs/xfs_fsmap.c
> > index 10e1cb71439e..e6677c690c1a 100644
> > --- a/fs/xfs/xfs_fsmap.c
> > +++ b/fs/xfs/xfs_fsmap.c
> > @@ -450,11 +450,11 @@ xfs_getfsmap_logdev(
> >  /* Transform a rtbitmap "record" into a fsmap */
> >  STATIC int
> >  xfs_getfsmap_rtdev_rtbitmap_helper(
> > +	struct xfs_mount		*mp,
> >  	struct xfs_trans		*tp,
> >  	const struct xfs_rtalloc_rec	*rec,
> >  	void				*priv)
> >  {
> > -	struct xfs_mount		*mp = tp->t_mountp;
> >  	struct xfs_getfsmap_info	*info = priv;
> >  	struct xfs_rmap_irec		irec;
> >  	xfs_daddr_t			rec_daddr;
> > @@ -535,7 +535,7 @@ xfs_getfsmap_rtdev_rtbitmap_query(
> >  	do_div(alow.ar_startext, mp->m_sb.sb_rextsize);
> >  	if (do_div(ahigh.ar_startext, mp->m_sb.sb_rextsize))
> >  		ahigh.ar_startext++;
> > -	error = xfs_rtalloc_query_range(tp, &alow, &ahigh,
> > +	error = xfs_rtalloc_query_range(tp->t_mountp, tp, &alow, &ahigh,
> 
> This can be mp rather than tp->t_mountp, right?

Yup.  Would you mind fixing that up on commit, please?

--D

> Cheers,
> 
> Dave.
> -- 
> Dave Chinner
> david@fromorbit.com

  reply	other threads:[~2022-04-11 19:46 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-10 18:20 [PATCHSET v2 0/3] xfs: fix corruption of free rt extent count Darrick J. Wong
2022-04-10 18:21 ` [PATCH 1/3] xfs: pass explicit mount pointer to rtalloc query functions Darrick J. Wong
2022-04-11  1:17   ` Dave Chinner
2022-04-11 19:46     ` Darrick J. Wong [this message]
2022-04-11 20:50       ` Dave Chinner
2022-04-10 18:21 ` [PATCH 2/3] xfs: recalculate free rt extents after log recovery Darrick J. Wong
2022-04-11  1:19   ` Dave Chinner
2022-04-10 18:21 ` [PATCH 3/3] xfs: use a separate frextents counter for rt extent reservations Darrick J. Wong
2022-04-11  1:26   ` Dave Chinner

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=20220411194620.GA16799@magnolia \
    --to=djwong@kernel.org \
    --cc=david@fromorbit.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox