Re: [PATCH] xfs: add static size checks for structures in xfs_fs.h
From: Christoph Hellwig
Date: Mon Feb 09 2026 - 09:48:00 EST
On Sat, Feb 07, 2026 at 09:27:07AM +1100, Dave Chinner wrote:
> Different architectures will have different padding, alignment and
> holes for the same structure (e.g. 32 bit vs 64 bit) resulting in
> different sizes for the same structure across different platforms.
>
> This is not actually a bug in the UAPI - as long as the
> architecture's userspace and the kernel are using the same structure
> layout, variations in structure size and layout between architectures
> don't matter.
Except for the pointers it generally is a bug in the structure
defintion, and even for pointers the current consensus is moving
towards encoding them as a u64. So yeah, this will have to skip
some of the older structures, but for anything newer it the right
thing to do, and will catch issues.