Re: [PATCH 1/7] xfs: make sure maxlen is still congruent with prod when rounding down

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

 



On Wed, Oct 11, 2023 at 11:02:50AM -0700, Darrick J. Wong wrote:
> Fix the problem by reducing maxlen by any misalignment with prod.  While
> we're at it, split the assertions into two so that we can tell which
> value had the bad alignment.

Yay, I always hate it when I trigger these compund asserts..

>  		maxlen = min(mp->m_sb.sb_rextents, i + maxlen) - i;
> +		maxlen -= maxlen % prod;

>  	maxlen = min(mp->m_sb.sb_rextents, bno + maxlen) - bno;
> +	maxlen -= maxlen % prod;

Not sure if that's bikeshedding, but this almost asks for a little
helper with a comment.

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