Re: [RFC PATCH] vfs: syscalls: Add create_automount() and remove_automount()
From: David Howells
Date: Wed Feb 19 2020 - 16:40:06 EST
Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:
> so you _could_ actually just make the rule be something simple like
> symlink(target, "//datagoeshere")
> being the "create magic autolink directory using "datagoeshere".
Interesting. I'll ask around to see if this is feasible. Some applications
(emacs being one maybe) sometimes appear to store information in symlink
bodies - I'm not sure if any of those could be a problem.
Since the mountpoint body is formulaic:
maybe I can use that pattern.
symlink() would be returning a dentry that appears to be a directory, but it
doesn't look like that should be a problem.
> So then you could again script things with
> mknod dirname c X Y
> echo "datagoeshere" > dirname
This would be tricky to get right as it's not atomic and the second part could
fail to happen. For extra fun, another client could interfere between the
steps (setxattr would be safer than write here).