[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <a30ac1fe-07ac-4b09-9ede-c9360a34a103@app.fastmail.com>
Date: Wed, 03 Jul 2024 20:44:50 +0200
From: "Arnd Bergmann" <arnd@...db.de>
To: "Linus Torvalds" <torvalds@...ux-foundation.org>,
"Xi Ruoyao" <xry111@...111.site>
Cc: "Christian Brauner" <brauner@...nel.org>,
"Xi Ruoyao" <libc-alpha@...rceware.org>,
"Andreas K Huettel" <dilfridge@...too.org>,
"Huacai Chen" <chenhuacai@...nel.org>, "Mateusz Guzik" <mjguzik@...il.com>,
"Alexander Viro" <viro@...iv.linux.org.uk>, "Jan Kara" <jack@...e.cz>,
linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
io-uring@...r.kernel.org, "Jens Axboe" <axboe@...nel.dk>,
loongarch@...ts.linux.dev
Subject: Re: [PATCH 2/2] vfs: support statx(..., NULL, AT_EMPTY_PATH, ...)
On Wed, Jul 3, 2024, at 19:40, Linus Torvalds wrote:
> On Wed, 3 Jul 2024 at 10:30, Xi Ruoyao <xry111@...111.site> wrote:
>>
>> struct stat64 {
>>
>> // ...
>>
>> int st_atime; /* Time of last access. */
>
> Oh wow. Shows just *how* long ago that was - and how long ago I looked
> at 32-bit code. Because clearly, I was wrong.
>
> I guess it shows how nobody actually cares about 32-bit any more, at
> least in the 2037 sense.
>
> The point stands, though - statx isn't a replacement for existing binaries.
We had long discussions about adding another stat()/fstat()
variant with 64-bit timestamps from 2012 to 2017, the result
was that we mandated that a libc implementation with 64-bit
time_t must only use statx() and not fall back to the time32
syscalls on kernels that are new enough to have statx().
This is both for architectures that were introduced after
time64 support was added (riscv32 and the glibc port for
arc), and for userspace builds that are explicitly using
time64 syscalls only.
That may have been a mistake in hindsight, or it may have
been the right choice, but the thing is that if we now decide
that 32-bit userspace can not rely on statx() to be available,
then we need to introduce one or two new system calls.
Arnd
Powered by blists - more mailing lists