Re: [PATCH 6/8] xfs: use accessor functions for bitmap words

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

 



On Wed, Oct 11, 2023 at 11:07:48AM -0700, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@xxxxxxxxxx>
> 
> Create get and set functions for rtbitmap words so that we can redefine
> the ondisk format with a specific endianness.  Note that this requires
> the definition of a distinct type for ondisk rtbitmap words so that the
> compiler can perform proper typechecking as we go back and forth.
> 
> In the upcoming rtgroups feature, we're going to fix the problem that
> rtwords are written in host endian order, which means we'll need the
> distinct rtword/rtword_raw types.

I've been looking over this and I have to say I kinda hate the
abstraction level.

Having to deal with both the union xfs_rtword_ondisk, and the
normal in-memory rtword just feels cumbersome.

I'd go for an API that gets/sets the values based on [bp, word] indices
instead.  That would also need helpers for logging the buffer ranges
based on indices, which seems helpful for the code quality anyway.

I don't really want to burden that on you and would offer to do that
work myself after we work before this merged.




[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