From: Al Viro <viro@ZenIV.linux.org.uk>
To: Ian Kent <raven@themaw.net>
Cc: autofs@linux.kernel.org, David Howells <dhowells@redhat.com>,
Trond.Myklebust@netapp.com, sfrench@samba.org,
Valerie Aurora <vaurora@redhat.com>,
linux-fsdevel@vger.kernel.org, Jan Blunck <jblunck@suse.de>
Subject: Re: [PATCH 1/7] autofs4: Save autofs trigger's vfsmount in super block info
Date: Mon, 18 Jan 2010 10:27:32 +0000 [thread overview]
Message-ID: <20100118102732.GU19799@ZenIV.linux.org.uk> (raw)
In-Reply-To: <4B542692.2070307@themaw.net>
On Mon, Jan 18, 2010 at 05:14:58PM +0800, Ian Kent wrote:
> The possibility of more than one vfsmount being present is, as you say
> possible, but it is not legal for autofs (and last time I checked I
> concluded it wasn't possible for me to veto bind mount requests). Other
> than bind mounts I'm struggling to think of a case where I would have
> more than one autofs fs mount with the same s_dev.
That's interesting... Other place where we go through the stack of mounts
is where we look for one with given bits in type; do we have a possibility
of multiple candidates there and which one do we really want? Same function,
case when we have ioctlfd == -1, !autofs_type_any(type). Current code
(as well as original) goes for one closest to root; it would certainly be
simpler to go for one on top of stack...
> Yes, the dentry should always be positive here but let me think about it
> a little more in case I'm missing something. And yes, using the vfsmount
> super block pointer would be better. I'll fix these too.
FWIW, I'd rather have that stuff in vfs tree; that's not the only patch
eliminating mnt_mountpoint use. AFAICT, none of the uses outside of
core VFS code are legitimate (and BTW, NFSv4 one is contrary to RFC - it
should do follow_down() in loop before reporting mount_fileid instead of
just picking the immediate ancestor for one thing and I'm not at all sure
that check around that thing is correct; it ignores export path.dentry
and looks at path.mnt.root instead, which seems to be wrong). Other places
would be just as happy with mnt/mnt->mnt_root instead of mnt->mnt_parent/
mnt->mnt_mountpoint or, worse, mnt/mnt->mnt_mountpoint. Pohmelfs is even
nastier, with its d_path() abuses, but that's a separate story.
IMO we ought to get rid of mnt_mountpoint/mnt_parent uses outside of core
VFS and I'd rather do that in one patch queue.
Back to another question: which syscalls should and which syscalls should not
trigger automount on the last component? Note that it's something we'd better
be consistent about between autofs4 and cifs/afs/nfs...
next prev parent reply other threads:[~2010-01-18 10:27 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-23 23:36 [PATCH 0/7] VFS prep for union mounts/writable overlays Valerie Aurora
2009-12-23 23:36 ` [PATCH 1/7] autofs4: Save autofs trigger's vfsmount in super block info Valerie Aurora
2009-12-23 23:36 ` [PATCH 2/7] VFS: Make lookup_hash() return a struct path Valerie Aurora
2009-12-23 23:36 ` [PATCH 3/7] VFS: Make real_lookup() " Valerie Aurora
2009-12-23 23:37 ` [PATCH 4/7] VFS: Propagate mnt_flags into do_loopback Valerie Aurora
2009-12-23 23:37 ` [PATCH 5/7] VFS: Add read-only users count to superblock Valerie Aurora
2009-12-23 23:37 ` [PATCH 6/7] VFS: BUG_ON() rehash of an already hashed dentry Valerie Aurora
2009-12-23 23:37 ` [PATCH 7/7] VFS: Remove unnecessary micro-optimization in cached_lookup() Valerie Aurora
2010-01-02 0:44 ` [PATCH 1/7] autofs4: Save autofs trigger's vfsmount in super block info Ian Kent
2010-01-14 5:43 ` Al Viro
2010-01-14 19:18 ` Valerie Aurora
2010-01-15 6:05 ` Ian Kent
2010-01-15 8:03 ` Al Viro
2010-01-15 17:36 ` Steve French
2010-01-18 5:08 ` Ian Kent
2010-01-15 14:55 ` David Howells
2010-01-15 16:58 ` Al Viro
2010-01-15 17:08 ` David Howells
2010-01-15 17:26 ` Al Viro
2010-01-16 10:17 ` Al Viro
2010-01-17 17:57 ` Al Viro
2010-01-18 4:21 ` Ian Kent
2010-01-18 5:59 ` Al Viro
2010-01-18 9:14 ` Ian Kent
2010-01-18 10:27 ` Al Viro [this message]
2010-01-18 19:35 ` Trond Myklebust
2010-01-19 7:05 ` Ian Kent
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=20100118102732.GU19799@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=Trond.Myklebust@netapp.com \
--cc=autofs@linux.kernel.org \
--cc=dhowells@redhat.com \
--cc=jblunck@suse.de \
--cc=linux-fsdevel@vger.kernel.org \
--cc=raven@themaw.net \
--cc=sfrench@samba.org \
--cc=vaurora@redhat.com \
/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).