netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Kirill A. Shutemov" <kas-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org>
To: Rob Landley <rlandley-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>
Cc: "Kirill A. Shutemov"
	<kas-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org>,
	Rob Landley <rob-VoJi6FS/r0vR7s880joybQ@public.gmane.org>,
	Trond Myklebust
	<Trond.Myklebust-HgOvQuBEEgTQT0dZR+AlfA@public.gmane.org>,
	"J. Bruce Fields"
	<bfields-uC3wQj2KruNg9hUCZPvPmw@public.gmane.org>,
	Neil Brown <neilb-l3A5Bk7waGM@public.gmane.org>,
	Pavel Emelyanov <xemul-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>,
	linux-nfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	"David S. Miller" <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>,
	netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH v2 00/12] make rpc_pipefs be mountable multiple time
Date: Thu, 30 Dec 2010 12:44:16 +0200	[thread overview]
Message-ID: <20101230104416.GA31824@shutemov.name> (raw)
In-Reply-To: <4D1C5953.6020200-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>

On Thu, Dec 30, 2010 at 04:05:07AM -0600, Rob Landley wrote:
> On 12/30/2010 03:44 AM, Kirill A. Shutemov wrote:
> >>> If no rpcmount mountoption, no rpc_pipefs was found at
> >>> '/var/lib/nfs/rpc_pipefs' and we are in init's mount namespace, we use
> >>> init_rpc_pipefs.
> >>
> >> It's the "we are in init's mount namespace" that I was wondering about.
> >>
> >> So if I naievely chroot, nfs mount stops working the way it did before I
> >> chrooted unless I do an extra setup step?
> >
> > No. It will work as before since you are still in init's mount namespace.
> > Creating new mount namespace changes rules.
> 
> Ah, CLONE_NEWNS and then you need /var/lib/nfs/rpc_pipefs.  Got it.
> 
> I'm kind of surprised that the kernel cares about a specific path under 
> /var/lib.  (Seems like policy in the kernel somehow.)

Yep. It's bad, but there is way to overwrite the default.

Other way is to leave 'rpcmount' mountoption without default.
get_rpc_pipefs(NULL) in init's mount namespace will always return
init_rpc_pipefs, without filesystem lookup.
get_rpc_pipefs(NULL) in non-init's mount namespace will always return
error.

So you will have to specify 'rpcmount' mountoption for every nfs mount in
container. Hmm, I guess, it may confuse user.

Or we can try to move the default to userspace. /sbin/mount.nfs?

> Can't it just 
> check the current process's mount list to see if an instance of 
> rpc_pipefs is mounted in the current namespace the way lxc looks for 
> cgroups?  Or are there potential performance/scalability issues with that?

What should we do if we have several rpc_pipefs mounts in the namespace?

-- 
 Kirill A. Shutemov
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2010-12-30 10:44 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-29 13:14 [PATCH v2 00/12] make rpc_pipefs be mountable multiple time Kirill A. Shutemov
2010-12-29 13:14 ` [PATCH v2 01/12] sunrpc: mount rpc_pipefs on initialization Kirill A. Shutemov
2010-12-29 13:14 ` [PATCH v2 02/12] sunrpc: introduce init_rpc_pipefs Kirill A. Shutemov
2010-12-29 13:14 ` [PATCH v2 03/12] sunrpc: push init_rpc_pipefs up to rpc_create() callers Kirill A. Shutemov
2010-12-29 13:14 ` [PATCH v2 04/12] sunrpc: tag svc_serv with rpc_pipefs mount point Kirill A. Shutemov
2010-12-29 13:14 ` [PATCH v2 05/12] sunrpc: get rpc_pipefs mount point for svc_serv from callers Kirill A. Shutemov
2010-12-29 13:14 ` [PATCH v2 06/12] lockd: get rpc_pipefs mount point " Kirill A. Shutemov
2010-12-29 13:14 ` [PATCH v2 07/12] sunrpc: get rpc_pipefs mount point for rpcb_create[_local] " Kirill A. Shutemov
2010-12-29 13:14 ` [PATCH v2 08/12] sunrpc: tag pipefs field of cache_detail with rpc_pipefs mount point Kirill A. Shutemov
2010-12-29 13:14 ` [PATCH v2 10/12] sunrpc: introduce get_rpc_pipefs() Kirill A. Shutemov
     [not found] ` <1293628470-28386-1-git-send-email-kas-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org>
2010-12-29 13:14   ` [PATCH v2 09/12] nfs: per-rpc_pipefs dns cache Kirill A. Shutemov
2010-12-29 13:14   ` [PATCH v2 11/12] nfs: introduce mount option 'rpcmount' Kirill A. Shutemov
2010-12-30  2:13   ` [PATCH v2 00/12] make rpc_pipefs be mountable multiple time Rob Landley
2010-12-30  8:51     ` Kirill A. Shutemov
     [not found]       ` <20101230085139.GA29697-oKw7cIdHH8eLwutG50LtGA@public.gmane.org>
2010-12-30  9:10         ` Rob Landley
     [not found]           ` <4D1C4C7C.6050606-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>
2010-12-30  9:44             ` Kirill A. Shutemov
2010-12-30 10:05               ` Rob Landley
     [not found]                 ` <4D1C5953.6020200-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>
2010-12-30 10:44                   ` Kirill A. Shutemov [this message]
     [not found]                     ` <20101230104416.GA31824-oKw7cIdHH8eLwutG50LtGA@public.gmane.org>
2010-12-30 11:05                       ` Rob Landley
     [not found]                         ` <AANLkTim2QrkSW0HufD5wp=-8ikwydN5SUS+fdWK6JHqb-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-12-30 11:45                           ` Kirill A. Shutemov
2010-12-30 12:52                             ` Rob Landley
2010-12-31 13:03                               ` Kirill A. Shutemov
2011-01-03 16:53                                 ` Kirill A. Shutemov
     [not found]                                 ` <20101231130329.GA3610-oKw7cIdHH8eLwutG50LtGA@public.gmane.org>
2011-01-03 20:38                                   ` Rob Landley
2010-12-31 16:54                   ` Trond Myklebust
2011-01-03 20:48                     ` Rob Landley
2011-01-05 11:41   ` Al Viro
     [not found]     ` <20110105114155.GN19804-3bDd1+5oDREiFSDQTTA3OLVCufUGDwFn@public.gmane.org>
2011-01-05 13:40       ` Kirill A. Shutemov
2011-01-07 11:12     ` Kirill A. Shutemov
2011-01-07 11:19       ` Kirill A. Shutemov
2010-12-29 13:14 ` [PATCH v2 12/12] sunrpc: make rpc_pipefs be mountable multiple times Kirill A. Shutemov

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=20101230104416.GA31824@shutemov.name \
    --to=kas-gefaqzzx7r8dnm+yrofe0a@public.gmane.org \
    --cc=Trond.Myklebust-HgOvQuBEEgTQT0dZR+AlfA@public.gmane.org \
    --cc=bfields-uC3wQj2KruNg9hUCZPvPmw@public.gmane.org \
    --cc=davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-nfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=neilb-l3A5Bk7waGM@public.gmane.org \
    --cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=rlandley-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org \
    --cc=rob-VoJi6FS/r0vR7s880joybQ@public.gmane.org \
    --cc=xemul-bzQdu9zFT3WakBO8gow8eQ@public.gmane.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).