Thread (5 messages) 5 messages, 3 authors, 2020-02-13

Re: [PATCH v8 07/11] proc: flush task dcache entries from all procfs instances

From: Linus Torvalds <torvalds@linux-foundation.org>
Date: 2020-02-13 22:48:12
Also in: linux-fsdevel, linux-security-module, lkml

Possibly related (same subject, not in this thread)

On Thu, Feb 13, 2020 at 2:23 PM Al Viro [off-list ref] wrote:
I'd been thinking of ->d_fsdata pointing to a structure with list_head
and a (non-counting) task_struct pointer for those guys.  Allocated
on lookup, of course (as well as readdir ;-/) and put on the list
at the same time.
Hmm. That smells like potentially a lot of small allocations, and
making readdir() even nastier.

Do we really want to create the dentries at readdir time? We do now
(with proc_fill_cache()) but do we actually _need_ to?

I guess a lot of readdir users end up doing a stat on it immediately
afterwards. I think right now we do it to get the inode number, and
maybe that is a basic requirement (even if I don't think it's really
stable - an inode could be evicted and then the ino changes, no?)

Ho humm. This all doesn't make me happy. But I guess the proof is in
the pudding - and if you come up with a good patch, I won't complain.

              Linus
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help