Linux XFS filesystem development
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Eric Sandeen <sandeen@sandeen.net>
Cc: linux-xfs@vger.kernel.org
Subject: Re: [PATCH] xfs: fix bs_xflags copied from wrong compat field
Date: Wed, 28 Oct 2026 08:17:12 -0700	[thread overview]
Message-ID: <auIR-BdWBY8vjXq4@infradead.org> (raw)
In-Reply-To: <56cba09a-305b-43a7-b0d9-d39820e8cefa@sandeen.net>

On Tue, Oct 27, 2026 at 11:26:09AM -0500, Eric Sandeen wrote:
> On 10/27/26 10:18 AM, Christoph Hellwig wrote:
> > I wonder if we should have a way to test these compat abis in
> > xfstests.  Have test programs (or xfs_io?) compiled with -m32
> > and compare to native?
> What about 2 things:
> 
> A refactor (to eliminate the need to type out matching structure names twice)
> and a kunit test?

I don't think kunit is all that helpful for copy to/from user tests..

> Something like:
> 
> #define BSTAT_GET(f)            (bstat->f = bstat32->f)
> 
> xfs_bstat_from_compat(
>         struct xfs_bstat                *bstat,
>         const struct compat_xfs_bstat   *bstat32)
> {
> 	BSTAT_GET(bs_ino);
> 	BSTAT_GET(bs_mode);
> 	BSTAT_GET(bs_nlink);
> 	...
> }

That makes the code so much harder to read for no real gain.


  reply	other threads:[~2026-10-28 15:17 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-16  2:11 [PATCH] xfs: fix bs_xflags copied from wrong compat field Reid D
2026-10-16  5:08 ` Darrick J. Wong
2026-10-16 14:26   ` Eric Sandeen
2026-10-27 15:18     ` Christoph Hellwig
2026-10-27 16:26       ` Eric Sandeen
2026-10-28 15:17         ` Christoph Hellwig [this message]
2026-10-27 15:18 ` Christoph Hellwig
2026-10-27 15:31 ` Eric Sandeen

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=auIR-BdWBY8vjXq4@infradead.org \
    --to=hch@infradead.org \
    --cc=linux-xfs@vger.kernel.org \
    --cc=sandeen@sandeen.net \
    /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