mbox series

[0/2] statx NULL path support

Message ID 20240625110029.606032-1-mjguzik@gmail.com (mailing list archive)
Headers show
Series statx NULL path support | expand

Message

Mateusz Guzik June 25, 2024, 11 a.m. UTC
Generated against vfs/vfs.empty.path, uses the new vfs_empty_path
helper.

I had to revert "xattr: handle AT_EMPTY_PATH correctly" locally due to
compilation errors.

io_uring is only-compile tested at the moment, perhaps the author
(cc'ed) has a handy testcase for statx.

Note rebasing this against newer fs branches will result in a trivial
merge conflict due to later removed argument from getname_flags.

Mateusz Guzik (2):
  vfs: add CLASS fd_raw
  vfs: support statx(..., NULL, AT_EMPTY_PATH, ...)

 fs/internal.h        |  2 +
 fs/stat.c            | 90 ++++++++++++++++++++++++++++++++------------
 include/linux/file.h |  1 +
 io_uring/statx.c     | 23 ++++++-----
 4 files changed, 81 insertions(+), 35 deletions(-)

Comments

Christoph Hellwig July 1, 2024, 4:38 a.m. UTC | #1
Maybe it's time and declarate the idea to deprecate stat a failure
and we just add it back to the new generic ABI syscalls?

The idea to get rid of layers of backwards compatibility was a good one
and mostly succeeded, but having to deal with not only remapping
the structure but also the empty path issues sounds like it is worth
to just add these pretty trivial system calls back and make everyones
life easier?
Xi Ruoyao July 1, 2024, 6:46 a.m. UTC | #2
On Sun, 2024-06-30 at 21:38 -0700, Christoph Hellwig wrote:
> Maybe it's time and declarate the idea to deprecate stat a failure
> and we just add it back to the new generic ABI syscalls?

> The idea to get rid of layers of backwards compatibility was a good one
> and mostly succeeded, but having to deal with not only remapping
> the structure but also the empty path issues sounds like it is worth
> to just add these pretty trivial system calls back and make everyones
> life easier?

Maybe but we'll need to make time_t 64-bit.  I.e. adding stat_time64,
fstat_time64, and fstatat_time64.  Or maybe just redesign a new syscall
which is a improved statx with empty path issue and remapping issue
solved.  (With statx itself it seems impossible to solve the remapping
issue...)