Serious error in autofs docs, which has design implications

Askar Safin <[email protected]>
Newsgroups org.kernel.vger.autofs,org.kernel.vger.linux-fsdevel
Message-ID <[email protected]>
Hi, Ian Kent and other autofs people.

autofs.rst says:
> mounting onto a directory is considered to be "beyond a `stat`"
in https://elixir.bootlin.com/linux/v6.17-rc2/source/Documentation/filesystems/autofs.rst#L109

This is not true. Mounting does not trigger automounts.

mount syscall (
https://elixir.bootlin.com/linux/v6.17-rc2/source/fs/namespace.c#L4321
) calls "do_mount" (
https://elixir.bootlin.com/linux/v6.17-rc2/source/fs/namespace.c#L4124
), which calls "user_path_at" without LOOKUP_AUTOMOUNT.
This means automounts are not followed.
I didn't test this, but I'm pretty sure about this by reading code.

But what is worse, autofs.rst then proceeds to use this as an argument in
favor of introducing DCACHE_MANAGE_TRANSIT!

I. e. it seems that introducing DCACHE_MANAGE_TRANSIT rests on
wrong premise.

Thus, it seems (from reading autofs.rst) that DCACHE_MANAGE_TRANSIT and all accociated logic
can be removed from kernel.

--
Askar Safin
https://types.pl/@safinaskar
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.