From: David Howells <dhowells@redhat.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: dhowells@redhat.com, Geert Uytterhoeven <geert@linux-m68k.org>,
Al Viro <viro@zeniv.linux.org.uk>,
coda@cs.cmu.edu, linux-afs@lists.infradead.org,
CIFS <linux-cifs@vger.kernel.org>,
"open list:NFS, SUNRPC, AND..." <linux-nfs@vger.kernel.org>,
linux-btrfs <linux-btrfs@vger.kernel.org>,
Linux FS Devel <linux-fsdevel@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [RFC PATCH] vfs: syscalls: Add create_automount() and remove_automount()
Date: Wed, 19 Feb 2020 19:58:01 +0000 [thread overview]
Message-ID: <252465.1582142281@warthog.procyon.org.uk> (raw)
In-Reply-To: <CAHk-=whfoWHvL29PPXncxV6iprC4e_m6CQWQJ1G4-JtR+uGVUA@mail.gmail.com>
Linus Torvalds <torvalds@linux-foundation.org> wrote:
> > Why don't you just use mkdir with S_ISVTX set, or something like that?
>
> Actually, since this is apparently a different filetype, the _logical_
> thing to do is to use "mknod()".
Actually, in many ways, they're more akin to symlinks (and are implemented as
symlinks with funny attributes). It's a shame that symlinkat() doesn't have
an at_flags parameter.
mknod() isn't otherwise supported on AFS as there aren't any UNIX special
files.
> You presumably need a new type _anyway_ for stat() and/or the filldir
> d_type field. Or do you always want to make it look exactly like a
> directory to all user space?
That's already dealt with. They're presented as directories with
STATX_ATTR_AUTOMOUNT showing when you call statx() on them. You can also use
readlink() to extract the target if they haven't been mounted over yet.
Inside the kernel, they have no ->lookup() op, so DCACHE_AUTODIR_TYPE is set
on the dentry and there's a ->d_automount() op. The inode has S_AUTOMOUNT
set. That's all taken care of when the inode is created and the dentry is
instantiated.
Davod
next prev parent reply other threads:[~2020-02-19 19:58 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-19 14:35 [RFC PATCH] vfs: syscalls: Add create_automount() and remove_automount() David Howells
2020-02-19 14:43 ` Geert Uytterhoeven
2020-02-19 15:08 ` David Howells
2020-02-19 17:00 ` Linus Torvalds
2020-02-19 17:55 ` David Howells
2020-02-19 18:55 ` Linus Torvalds
2020-02-19 19:07 ` Linus Torvalds
2020-02-19 19:26 ` Linus Torvalds
2020-02-19 19:58 ` David Howells [this message]
2020-02-19 20:12 ` Linus Torvalds
2020-02-19 21:39 ` David Howells
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=252465.1582142281@warthog.procyon.org.uk \
--to=dhowells@redhat.com \
--cc=coda@cs.cmu.edu \
--cc=geert@linux-m68k.org \
--cc=linux-afs@lists.infradead.org \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-cifs@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).