Thread (72 messages) 72 messages, 8 authors, 2021-07-07

Re: [PATCH RFC 1/3] fs: introduce helper d_path_fast()

From: Al Viro <viro@zeniv.linux.org.uk>
Date: 2021-05-09 04:59:16
Also in: linux-fsdevel, linux-s390, lkml

On Sun, May 09, 2021 at 02:20:32AM +0000, Al Viro wrote:
Umm...  Interesting, especially considering the way dyname_dname() looks like.
                                                      dynamic_dname(), obviously.
Looks like there's a piece of prepend() open-coded in it.  And
since all ->d_dname() instances are either simple_dname() or end up
with call of dynamic_dname()...

Might make sense to turn that method into
	int (*d_dname)(struct dentry *, struct prepend_buffer *);

Followup patch, obviously, but it might be worth looking into.

Another thing that keeps bugging me about prepend_path() is the
set of return values.  I mean, 0/1/2/3/-ENAMETOOLONG, and all
except 0 are unlikely?  Might as well make that 0/1/2/3/-1, if
not an outright 0/1/2/3/4.  And prepend() could return bool, while
we are at it (true - success, false - overflow)...
OK...  I think I see how to carve it up sanely, will post after I
get some sleep.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help