From: Al Viro <viro@zeniv.linux.org.uk>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Jens Axboe <axboe@kernel.dk>,
linux-fsdevel@vger.kernel.org, Jann Horn <jannh@google.com>
Subject: Re: [PATCH][RFC] make take_dentry_name_snapshot() lockless
Date: Tue, 24 Dec 2024 20:24:54 +0000 [thread overview]
Message-ID: <20241224202454.GT1977892@ZenIV> (raw)
In-Reply-To: <CAHk-=wi6-XuqHrQ6ndE5jUR_rLnXZS2ZnhjbqjXTqxUthK_SBA@mail.gmail.com>
On Tue, Dec 24, 2024 at 11:44:55AM -0800, Linus Torvalds wrote:
> On Tue, 24 Dec 2024 at 11:18, Al Viro <viro@zeniv.linux.org.uk> wrote:
> >
> > if (f)
> > seq_file_path(m, f, " \t\n\\<");
> > else
> > seq_puts(m, "<none>");
>
> Maybe seq_file_path() could do the "<none>" thing itself.
>
> Right now it looks like d_path() just oopses with a NULL pointer
> dereference if you pass it a NULL path. Our printk() routines -
> including '%pd' - tend to do "(null)" for this case (and also handle
> ERR_PTR() cases) thanks to the 'check_pointer()' logic.
Umm... What about the escape character set? If we have
seq_file_path() produce "<none>" for a NULL file reference, we'd
need to make sure that file called "<none>" won't get mixed with
that...
OTOH, there will be leading / in all cases except for
pipes/sockets/anon files/anything that has ->d_dname() and
it looks like the output of all instances has either '/' or
':' in it... Feels brittle, though.
Anyway, I'm not at all sure that those <none> lines are
actually useful for anything - we get something like
UserFiles: 512
followed by 512 lines of form index:name or index:<none>, with
indices going from 0 to 511.
We are dumping an io_uring private descriptor table - all
of it in one call of ->show(). And each line is prepended with
the slot number, so it's not obvious that dumping empty slots
makes sense.
next prev parent reply other threads:[~2024-12-24 20:24 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-09 3:52 [PATCH][RFC] make take_dentry_name_snapshot() lockless Al Viro
2024-12-09 6:33 ` Mateusz Guzik
2024-12-09 6:58 ` Al Viro
2024-12-09 7:18 ` Mateusz Guzik
2024-12-09 7:41 ` Al Viro
2024-12-09 18:27 ` Linus Torvalds
2024-12-09 21:17 ` Al Viro
2024-12-09 22:28 ` Al Viro
2024-12-09 22:49 ` Linus Torvalds
2024-12-09 22:55 ` Linus Torvalds
2024-12-09 23:12 ` Al Viro
2024-12-10 2:45 ` Al Viro
2024-12-10 2:48 ` [PATCH 1/5] make sure that DCACHE_INLINE_LEN is a multiple of word size Al Viro
2024-12-10 2:48 ` [PATCH 2/5] dcache: back inline names with a struct-wrapped array of unsigned long Al Viro
2024-12-10 2:48 ` [PATCH 3/5] make take_dentry_name_snapshot() lockless Al Viro
2024-12-10 2:48 ` [PATCH 4/5] dissolve external_name.u into separate members Al Viro
2024-12-10 2:48 ` [PATCH 5/5] ext4 fast_commit: make use of name_snapshot primitives Al Viro
2024-12-23 4:25 ` [PATCH][RFC] make take_dentry_name_snapshot() lockless Al Viro
2024-12-23 4:37 ` Al Viro
2024-12-23 21:31 ` Jens Axboe
2024-12-24 19:18 ` Al Viro
2024-12-24 19:44 ` Linus Torvalds
2024-12-24 20:24 ` Al Viro [this message]
2024-12-09 19:06 ` Linus Torvalds
2024-12-09 20:27 ` Al Viro
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=20241224202454.GT1977892@ZenIV \
--to=viro@zeniv.linux.org.uk \
--cc=axboe@kernel.dk \
--cc=jannh@google.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.