Re: [PATCH 1/2] xfs: Clear W=1 warning in xfs_iwalk_run_callbacks():

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

 



On Fri, Apr 26, 2024 at 09:30:05AM +1000, Dave Chinner wrote:
> 	ASSERT(xfs_verify_agbno(args->pag, acur->rec_bno + acur->rec_len));
> 
> 	or:
> 
> 	ASSERT(xfs_verify_agbext(args->pag, acur->rec_bno, acur->rec_len));
> 
> The latter is better, as it verifies both the start and the end of
> the extent are within the bounds of the AG and catches overflows...

Yupp.  That's what I mean with my original comment - once you start
thinking a little bigger there is usually a much better option than
these __maybe_unused hacks.

Using perag fields and helpers instead of raw buffer access would
also benefit a few other places in the allocator 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