Re: [PATCH 1/3] xfs: pass explicit mount pointer to rtalloc query functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Apr 10, 2022 at 11:21:00AM -0700, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@xxxxxxxxxx>
> 
> 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@xxxxxxxxxx>

Looks good, minor nit below.

Reviewed-by: Dave Chinner <dchinner@xxxxxxxxxx>

> 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?

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux