[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <a1807d6f-1b47-4a30-86d8-eea56d990ed9@app.fastmail.com>
Date: Fri, 05 Dec 2025 12:22:07 +0100
From: "Arnd Bergmann" <arnd@...db.de>
To: "Andreas Dilger" <adilger@...ger.ca>, "Jan Kara" <jack@...e.cz>,
"Arnd Bergmann" <arnd@...nel.org>
Cc: "Theodore Ts'o" <tytso@....edu>, "Darrick J. Wong" <djwong@...nel.org>,
linux-ext4@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ext4: fix ext4_tune_sb_params padding
On Fri, Dec 5, 2025, at 11:17, Andreas Dilger wrote:
>> On Dec 4, 2025, at 3:31 AM, Jan Kara <jack@...e.cz> wrote:
>> On Thu 04-12-25 11:19:10, Arnd Bergmann wrote:
>
> While this change isn't _wrong_ per-se, it does seem very strange to have
> a 68-byte padding at the end of the struct. You have to check the number
> of __u32 fields closely to see this,
I had the same thought but decided against that because it would be
an ABI break on all architectures. The version I posted only changes
the structure size on x86-32, csky, m68k and microblaze, as far
as I can tell.
> and I wonder if this will perpetuate
> errors in the future (e.g. adding a __u64 field after mount_opts[64]).
Indeed, I can see how that could become worse.
> IMHO, it would be more clear to either add an explicit "__u32 pad_3;"
> field after mount_opts[64], or alternately declare mount_opts[68] so it
> will consume those bytes and leave the remaining fields properly aligned.
> It isn't critical if the user tools use the last 4 bytes of mount_opts[]
> or not, so they could be changed independently at some later time.
>
> Either will ensure that new fields added in place of pad[64] will be
> properly aligned in the future.
Changing mount_opts[] to 68 bytes sounds fine to me, I'll send an
updated patch for that. I've kept the Ack from Jan, please shout
if I should drop that instead.
Arnd
Powered by blists - more mailing lists