[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20260206060803.GA25214@lst.de>
Date: Fri, 6 Feb 2026 07:08:03 +0100
From: Christoph Hellwig <hch@....de>
To: Wilfred Mallawa <wilfred.opensource@...il.com>
Cc: Carlos Maiolino <cem@...nel.org>,
"Darrick J . Wong" <djwong@...nel.org>, linux-xfs@...r.kernel.org,
linux-kernel@...r.kernel.org, Christoph Hellwig <hch@....de>,
Wilfred Mallawa <wilfred.mallawa@....com>
Subject: Re: [PATCH] xfs: add static size checks for structures in xfs_fs.h
On Fri, Feb 06, 2026 at 01:05:58PM +1000, Wilfred Mallawa wrote:
> From: Wilfred Mallawa <wilfred.mallawa@....com>
>
> This patch adds static size checks for the structures in
> libxfs/xfs_fs.h.
That's very useful, as adding new fields can mess them up, thanks!
Nit on the commit message: "This patch ..." is redundant and get some
maintainers enraged. Maybe also amend this blurb to mention why we want
the size checks:
Add static size checks for the ioctl UAPI structures in
libxfs/xfs_fs.h..
> The structures with architecture dependent size for
> fields are ommited from this patch (such as xfs_bstat which depends on
> __kernel_long_t).
Good point. Maybe also add this as a commen in the code?
> Also remove some existing duplicate entries of XFS_CHECK_STRUCT_SIZE().
Oh, good on. This should probably be split into a separate
patch. I'd also keep the first occurrence and remove those under
the "/* ondisk dir/attr structures from xfs/122 */" label.
> + /* direct I/O */
> + XFS_CHECK_STRUCT_SIZE(struct dioattr, 12);
It probably make sense to keep the uapi ones a bit separated from
the on-disk ones. I.e. add a
/* ioctl UABI */
comment at end end, move xfs_bulkstat/xfs_inumbers/xfs_bulkstat_req/
xfs_inumbers_req there and add all the new ones.
Powered by blists - more mailing lists