# 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 
- List: linux-doc
- Page: https://ratatoskr.run/linux-doc/2021/05/205554
- Thread: https://ratatoskr.run/linux-doc/2021/05/205534/t.md

```text
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.
```
