linux-fsdevel.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-fsdevel@vger.kernel.org
Subject: Re: [PATCH 1/4] VFS: Add a VFS helper function vfs_remote_path_lookup()
Date: Thu, 2 Apr 2009 20:52:12 +0100	[thread overview]
Message-ID: <20090402195212.GK28946@ZenIV.linux.org.uk> (raw)
In-Reply-To: <1238700874.16087.42.camel@heimdal.trondhjem.org>

On Thu, Apr 02, 2009 at 03:34:34PM -0400, Trond Myklebust wrote:
> > *OW*
> > 
> > I've missed that completely.  OK, may I see the users, please?
> 
> This is why I'm reluctant to call it unshare_mnt_namespace() and was why
> I was trying to limit the usage of the interface.

Ho-hum...  You know what, it *still* fits into unshare() model.  The thing
is, if you look at the origin of clone()/unshare() (i.e. Plan 9 rfork()),
there's the following group of flags:

   RFNAMEG    If set, the new process inherits a copy of the parent's
   name space; otherwise the new process shares the parent's name space.
   Is mutually exclusive with RFCNAMEG.
   RFCNAMEG   If set, the new process starts with a clean name space. A
   new name space must be built from a mount of an open file descriptor.
   Is mutually exclusive with RFNAMEG.
   RFNOMNT    If set, subsequent mounts into the new name space and
   dereferencing of pathnames starting with # are disallowed.

And analog of that sucker (RFCNAMEG) is just about what you are doing
(well, that + attaching your vfsmount as separate action).  So how about
about CLONE_CLEANNS and passing it in flags?  Linus, do you have any
objections against such a flag?  It'd give you a new instance of
rootfs (empty, obviously) as root and flip root/pwd to it.

The thing is, I really want it to make sense other than just a very
specialized wrapper around path lookup.  We *already* have a bunch of
places doing subsets of unshare()-and-save; would be nice to get it
right once and for all...

BTW, if we look into the original, there's also RFCFDG - "give it an empty
descriptor table".  Might be also interesting, but that's a separate story.

  parent reply	other threads:[~2009-04-02 19:52 UTC|newest]

Thread overview: 30+ 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 3/4] NFS: Fix nfs_path() to always return a '/' at the beginning of the path Trond Myklebust
     [not found] ` <cover.1238525532.git.Trond.Myklebust-HgOvQuBEEgTQT0dZR+AlfA@public.gmane.org>
2009-03-11 19:50   ` [PATCH 1/4] VFS: Add a VFS helper function vfs_remote_path_lookup() Trond Myklebust
     [not found]     ` <3f1264127d431f695be25b940b477e3d287edc68.1238525532.git.Trond.Myklebust-HgOvQuBEEgTQT0dZR+AlfA@public.gmane.org>
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
2009-04-01 13:06         ` Trond Myklebust
     [not found]         ` <1238616394.24360.2.camel@heimdal.trondhjem.org>
     [not found]           ` <20090401202629.GG28946@ZenIV.linux.org.uk>
     [not found]             ` <1238628133.24360.51.camel@heimdal.trondhjem.org>
     [not found]               ` <20090401233252.GH28946@ZenIV.linux.org.uk>
     [not found]                 ` <1238629407.19782.5.camel@heimdal.trondhjem.org>
     [not found]                   ` <20090402191709.GJ28946@ZenIV.linux.org.uk>
     [not found]                     ` <1238700874.16087.42.camel@heimdal.trondhjem.org>
2009-04-02 19:52                       ` Al Viro [this message]
2009-04-02 19:57                         ` Al Viro
2009-04-02 20:17                           ` Linus Torvalds
2009-04-02 20:28                             ` Al Viro
2009-04-02 20:45                               ` Trond Myklebust
2009-04-02 20:54                                 ` Al Viro
2009-04-02 20:56                                   ` Al Viro
2009-04-02 21:10                                     ` Trond Myklebust
2009-04-02 22:16                                   ` Trond Myklebust
2009-04-02 23:18                                     ` Al Viro
2009-04-03  1:09                                       ` Al Viro
2009-04-03  1:52                                         ` Al Viro
2009-04-03  1:53                                           ` Al Viro
2009-04-03 19:13                                           ` Trond Myklebust
2009-04-05  2:25                                             ` Al Viro
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 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=20090402195212.GK28946@ZenIV.linux.org.uk \
    --to=viro@zeniv.linux.org.uk \
    --cc=Trond.Myklebust@netapp.com \
    --cc=linux-fsdevel@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).