Re: [PATCH 2/5] xfs_db: fix alignment checks in getbitval

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

 



On Mon, Mar 25, 2024 at 08:21:21PM -0700, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@xxxxxxxxxx>
> 
> For some reason, getbitval insists upon collecting a u64 from a pointer
> bit by bit if it's not aligned to a 16-byte boundary.  Modern day
> systems only seem to require N-byte alignment for an N-byte quantity, so
> let's do that instead.

Not sure what modern day systems means here.  In general in C you can
do unaligned access, but it might be very inefficient. 

If this code does what I think it does, maybe the right thing is to
simply use the get_unaligned_be{16,32,64} helpers?





[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