From: Mateusz Guzik <[email protected]>
To: Xi Ruoyao <[email protected]>
Cc: [email protected], [email protected], [email protected],
[email protected], [email protected],
[email protected], [email protected],
[email protected], [email protected]
Subject: Re: [PATCH 2/2] vfs: support statx(..., NULL, AT_EMPTY_PATH, ...)
Date: Tue, 25 Jun 2024 15:28:20 +0200 [thread overview]
Message-ID: <CAGudoHHn+N2oUJH9DE86gDFxntV46CxrLtC7=B6dTOjxM4mQOA@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
On Tue, Jun 25, 2024 at 3:24 PM Xi Ruoyao <[email protected]> wrote:
>
> On Tue, 2024-06-25 at 13:00 +0200, Mateusz Guzik wrote:
> > + if (flags == AT_EMPTY_PATH && vfs_empty_path(dfd, filename))
>
> Could it be
>
> if ((flags & AT_EMPTY_PATH) && vfs_empty_path(dfd, filename))
>
> instead?
>
> When fstatat is implemented with statx AT_NO_AUTOMOUNT is needed, or at
> least Glibc developers think it's needed:
>
> #if FSTATAT_USE_STATX
>
> static inline int
> fstatat64_time64_statx (int fd, const char *file, struct __stat64_t64 *buf,
> int flag)
> {
> /* 32-bit kABI with default 64-bit time_t, e.g. arc, riscv32. Also
> 64-bit time_t support is done through statx syscall. */
> struct statx tmp;
> int r = INTERNAL_SYSCALL_CALL (statx, fd, file, AT_NO_AUTOMOUNT | flag,
> STATX_BASIC_STATS, &tmp);
>
> so "flags == AT_EMPTY_PATH" won't be true if Glibc implements fstatat
> and fstat via statx (on LoongArch and 32-bit platforms).
>
> I was just surprised when I saw a 100%+ improve for statx("",
> AT_EMPTY_PATH) but not stat on the Loongson machine.
>
It can't be like that specifically because we still need to catch
bogus AT flags.
I'm going to poke a little bit and send a v2, thanks.
--
Mateusz Guzik <mjguzik gmail.com>
next prev parent reply other threads:[~2024-06-25 13:28 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-25 11:00 [PATCH 0/2] statx NULL path support Mateusz Guzik
2024-06-25 11:00 ` [PATCH 1/2] vfs: add CLASS fd_raw Mateusz Guzik
2024-06-25 12:22 ` Xi Ruoyao
2024-06-25 13:13 ` Mateusz Guzik
2024-06-25 11:00 ` [PATCH 2/2] vfs: support statx(..., NULL, AT_EMPTY_PATH, ...) Mateusz Guzik
2024-06-25 13:24 ` Xi Ruoyao
2024-06-25 13:28 ` Xi Ruoyao
2024-06-25 13:28 ` Mateusz Guzik [this message]
2024-06-25 14:09 ` Huacai Chen
2024-06-25 14:58 ` Xi Ruoyao
2024-06-30 1:40 ` Huacai Chen
2024-06-30 2:39 ` Xi Ruoyao
2024-06-30 13:18 ` Huacai Chen
2024-07-01 11:59 ` Arnd Bergmann
2024-07-02 15:36 ` Huacai Chen
2024-07-02 17:06 ` Arnd Bergmann
2024-07-03 4:30 ` Huacai Chen
2024-07-03 8:45 ` Christian Brauner
2024-07-03 9:35 ` Huacai Chen
2024-07-03 10:07 ` Xi Ruoyao
2024-07-03 16:31 ` Linus Torvalds
2024-07-03 16:54 ` Xi Ruoyao
2024-07-03 17:09 ` Linus Torvalds
2024-07-03 17:30 ` Xi Ruoyao
2024-07-03 17:40 ` Linus Torvalds
2024-07-03 17:54 ` Linus Torvalds
2024-07-03 18:14 ` Christian Brauner
2024-07-03 18:39 ` Christian Brauner
2024-07-03 19:00 ` Linus Torvalds
2024-07-03 19:18 ` Linus Torvalds
2024-07-03 18:48 ` Xi Ruoyao
2024-07-03 19:05 ` Linus Torvalds
2024-07-03 19:33 ` Christian Brauner
2024-07-03 19:52 ` Linus Torvalds
2024-07-03 18:44 ` Arnd Bergmann
2024-07-03 19:55 ` Christian Brauner
2024-07-03 17:11 ` Xi Ruoyao
2024-07-04 2:38 ` Huacai Chen
2024-07-04 3:23 ` Xi Ruoyao
2024-07-04 4:14 ` Xi Ruoyao
2024-07-04 5:55 ` Florian Weimer
2024-07-04 6:02 ` Xi Ruoyao
2024-07-01 4:38 ` [PATCH 0/2] statx NULL path support Christoph Hellwig
2024-07-01 6:46 ` Xi Ruoyao
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='CAGudoHHn+N2oUJH9DE86gDFxntV46CxrLtC7=B6dTOjxM4mQOA@mail.gmail.com' \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
/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