linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Al Viro <viro@ZenIV.linux.org.uk>
To: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-fsdevel@vger.kernel.org, hch@infradead.org
Subject: Re: [PATCH 1/4] VFS: Add a VFS helper function vfs_remote_path_lookup()
Date: Wed, 1 Apr 2009 03:15:54 +0100	[thread overview]
Message-ID: <20090401021554.GV28946@ZenIV.linux.org.uk> (raw)
In-Reply-To: <3f1264127d431f695be25b940b477e3d287edc68.1238525532.git.Trond.Myklebust@netapp.com>

On Wed, Mar 11, 2009 at 03:50:33PM -0400, Trond Myklebust wrote:
> The purpose of this patch is to improve the mount path lookup support for
> filesystems such as NFSv4, which require you to look up a mount path
> string in a remote server's namespace.
> 
> Traversing such a path is pretty much identical to walking a local path,
> in that it may involve following symlinks and even following referrals to
> volumes that reside on other servers. Since the standard VFS path lookup
> code already supports all these features (using in-kernel automounts for
> following referrals) it would be nice to be able to reuse that code rather
> than special case the mount path lookup in the NFS client.
> 
> This patch therefore defines a VFS helper function that sets up a temporary
> mount namespace to represent the server namespace, and has the current
> task pivot into that prior to doing the path lookup. Upon completion, it
> pivots back into the original namespace, and destroys the private one.

NAK.  You are relying on too many things about caller (e.g. just what happens
if you have shared fs_struct?  Does caller guarantee it won't happen?), so
that's a bloody bad interface.  Open-code that sucker, then let's see what
to do with surrounding code.  As it stands - no.

  parent reply	other threads:[~2009-04-01  2:16 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-31 18:52 [PATCH 0/4] Allow NFS to use ordinary path lookup when mounting NFSv4 Trond Myklebust
2009-03-11 19:50 ` [PATCH 1/4] VFS: Add a VFS helper function vfs_remote_path_lookup() Trond Myklebust
2009-03-31 21:40   ` Linus Torvalds
2009-03-31 22:37     ` Trond Myklebust
2009-03-31 22:43       ` Linus Torvalds
     [not found]         ` <alpine.LFD.2.00.0903311540120.6474-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2009-03-31 23:38           ` Trond Myklebust
2009-04-01  0:16             ` Linus Torvalds
     [not found]               ` <alpine.LFD.2.00.0903311715110.4130-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2009-04-01  0:51                 ` Trond Myklebust
     [not found]                   ` <1238547065.28445.178.camel-rJ7iovZKK19ZJLDQqaL3InhyD016LWXt@public.gmane.org>
2009-04-01  1:04                     ` Linus Torvalds
     [not found]       ` <1238539079.28445.103.camel-rJ7iovZKK19ZJLDQqaL3InhyD016LWXt@public.gmane.org>
2009-03-31 22:49         ` Trond Myklebust
2009-04-01  2:15   ` Al Viro [this message]
2009-04-01 13:06     ` Trond Myklebust
2009-03-11 19:50 ` [PATCH 2/4] NFSv4: Use vfs_path_lookup() instead of nfs4_path_walk() Trond Myklebust
2009-03-11 19:50 ` [PATCH 3/4] NFS: Fix nfs_path() to always return a '/' at the beginning of the path Trond Myklebust
2009-03-11 19:50 ` [PATCH 4/4] NFS: Correct the NFS mount path when following a referral Trond Myklebust

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=20090401021554.GV28946@ZenIV.linux.org.uk \
    --to=viro@zeniv.linux.org.uk \
    --cc=Trond.Myklebust@netapp.com \
    --cc=hch@infradead.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    /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).