Re: [PATCH 4/7] xfs: create helpers to convert rt block numbers to rt extent numbers

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

 



On Wed, Oct 11, 2023 at 11:05:27AM -0700, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@xxxxxxxxxx>
> 
> Create helpers to do unit conversions of rt block numbers to rt extent
> numbers.  There are two variations -- the suffix "t" denotes the one
> that returns only the truncated extent number; the other one also
> returns the misalignment.  Convert all the div_u64_rem users; we'll do
> the do_div users in the next patch.

When trying to work with thee helpers I found the t prefix here a bit
weird, as it works different than the T in say XFS_B_TO_FSB
vs XFS_B_TO_FSBT which give you different results for the two versions.
Here we get the same returned result, just with the additional
return for the remainder.

Maybe have xfs_rtb_to_rtx and xfs_rtb_to_rtx_rem for the version with
the modulo?

We also have quite a few places that only care about the mod,
so an additƣonal xfs_rtb_rem/mod might be useful as well.




[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