Thread (19 messages) 19 messages, 4 authors, 2021-07-15

Re: [PATCH 1/7] namei: clean up do_rmdir retry logic

From: Dmitry Kadashev <hidden>
Date: 2021-07-15 10:38:17
Also in: linux-fsdevel

On Tue, Jul 13, 2021 at 11:58 PM Linus Torvalds
[off-list ref] wrote:
On Tue, Jul 13, 2021 at 7:53 AM Christian Brauner
[off-list ref] wrote:
quoted
Instead of naming all these $something_helper I would follow the
underscore naming pattern we usually do, i.e. instead of e.g.
rmdir_helper do __rmdir() or __do_rmdir().
That's certainly a pattern we have, but I don't necessarily love it.

It would be even better if we'd have names that actually explain
what/why the abstraction exists. In this case, it's the "possibly
retry due to ESTALE", but I have no idea how to sanely name that.
Making it "try_rmdir()" or something like that is the best I can come
up with right now.

On  a similar note, the existing "do_rmdir()" and friends aren't
wonderful names either, but we expose that name out so changing it is
probably not worth it. But right now we have "vfs_rmdir()" and
"do_rmdir()", and they are just different levels of the "rmdir stack",
without the name really describing where in the stack they are.

Naming is hard, and I don't think the double underscores have been
wonderful either.
Naming *is* hard, I do not have any good ideas here, so I just went with
try_rmdir(). Christian, Linus, let me know if that is not good enough.

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