public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Wilfred Mallawa <wilfred.opensource@gmail.com>
Cc: Carlos Maiolino <cem@kernel.org>,
	"Darrick J . Wong" <djwong@kernel.org>,
	linux-xfs@vger.kernel.org, linux-kernel@vger.kernel.org,
	Christoph Hellwig <hch@lst.de>,
	Wilfred Mallawa <wilfred.mallawa@wdc.com>
Subject: Re: [PATCH] xfs: add static size checks for structures in xfs_fs.h
Date: Fri, 6 Feb 2026 07:08:03 +0100	[thread overview]
Message-ID: <20260206060803.GA25214@lst.de> (raw)
In-Reply-To: <20260206030557.1201204-2-wilfred.opensource@gmail.com>

On Fri, Feb 06, 2026 at 01:05:58PM +1000, Wilfred Mallawa wrote:
> From: Wilfred Mallawa <wilfred.mallawa@wdc.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.


  reply	other threads:[~2026-02-06  6:08 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-06  3:05 [PATCH] xfs: add static size checks for structures in xfs_fs.h Wilfred Mallawa
2026-02-06  6:08 ` Christoph Hellwig [this message]
2026-02-09  7:04   ` Wilfred Mallawa
2026-02-09 14:47     ` hch
2026-02-10  5:59       ` Wilfred Mallawa
2026-02-06  9:39 ` kernel test robot
2026-02-06 11:02 ` kernel test robot
2026-02-06 18:03 ` kernel test robot
2026-02-06 22:27 ` Dave Chinner
2026-02-09  6:57   ` Wilfred Mallawa
2026-02-09 14:41   ` Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260206060803.GA25214@lst.de \
    --to=hch@lst.de \
    --cc=cem@kernel.org \
    --cc=djwong@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    --cc=wilfred.mallawa@wdc.com \
    --cc=wilfred.opensource@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox