Re: [PATCH] xfs: add static size checks for structures in xfs_fs.h

From: Wilfred Mallawa

Date: Tue Feb 10 2026 - 00:59:52 EST


[snip]...
>
> Out of the Linux supported architectures there are basically five
> kinds of differences a struct ABI can have:
>
>  1) different pointer sizes
>  2) different size of long for long derived types
>  3) different alignment of u64 on i386 vs everyone else
>  4) different alignment of u16 on arm32-oldabi vs everyone else
>  5) configuration dependencies
>
> 5) is a no-go for exported types
>
> 4) doesn't happen in the current xfs uapi headers (it happens in on-
> disk
> formats structs though..).
>
> 3) is clearly indicated by the x86-specific handlers in xfs_ioctl32.c
>
> 2) and 1) are indicated by the other handlers in xfs_ioctl32.c.
>
> Based on that your above list is a good start, but incomplete.
> The list of compat_ structures in fs/xfs/xfs_ioctl32.h should have
> a complete list, and if doesn't that is a bug as we're missing
> compat handlers.

Thanks! I've removed all of the compat__ structs listed in
xfs_ioctl32.h for V2 that was in V1. Compiling for i386 tested okay.

Wilfred