Re: [PATCH 35/50] xfs_db: report rt group and block number in the bmap command

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

 



On Fri, Dec 06, 2024 at 04:14:05PM -0800, Darrick J. Wong wrote:
> +static void
> +print_group_bmbt(
> +	bool			isrt,
> +	int			whichfork,
> +	const struct bmap_ext	*be)
> +{
> +	unsigned int		gno;
> +	unsigned long long	gbno;
> +
> +	if (whichfork == XFS_DATA_FORK && isrt) {
> +		gno = xfs_rtb_to_rgno(mp, be->startblock);
> +		gbno = xfs_rtb_to_rgbno(mp, be->startblock);
> +	} else {
> +		gno = XFS_FSB_TO_AGNO(mp, be->startblock);
> +		gbno = XFS_FSB_TO_AGBNO(mp, be->startblock);

Maybe use xfs_fsb_to_gno and xfs_fsb_to_gbno here?

Otherwise looks good:

Reviewed-by: Christoph Hellwig <hch@xxxxxx>




[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