Re: [PATCHSET RFC v1.0 0/7] xfs: clean up realtime type usage

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

 



On Mon, Oct 16, 2023 at 05:48:31PM -0700, Darrick J. Wong wrote:
> We can do it crappily in C with __bitwise and letting the static checker
> bots go wild.  Some day when someone rewrites the entire codebase in
> Rust (HA!) then we'll be able to do:
> 
> struct xfs_fsblock_t(u64);
> struct xfs_agblock_t(u32);
> 
> and (to the extent that I understand Rust) the Rust compiler will
> complain about stuffing xfs_agblock_t into an xfs_fsblock_t without a
> proper conversion.

You can do the struct in C already.  Linux actually does it for PTE
types optionally.  It's just a real pain in the butt if your regularly
do arithmetics on it, which we do for the various block/size/offset
types.

> 
> --D
---end quoted text---



[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