[Devel] nfsd and containers

2009-01-03 Thread J. Bruce Fields
Does anyone have any ideas about how the kernel's nfsd should interact (if at all) with network namespaces? I'm initially interested because I've been experimenting with modifying the server to allow it to present different exported filesystems depending on which ip address it's accessed through.

[Devel] Re: nfsd and containers

2009-01-06 Thread J. Bruce Fields
On Mon, Jan 05, 2009 at 02:55:18PM -0800, Matt Helsley wrote: > On Mon, 2009-01-05 at 10:40 -0600, Serge E. Hallyn wrote: > > Quoting J. Bruce Fields (bfie...@fieldses.org): > > > Does anyone have any ideas about how the kernel's nfsd should interact > > > (if

[Devel] Re: [RFC][PATCH 2/4] sunrpc: Use utsnamespaces

2009-01-06 Thread J. Bruce Fields
On Tue, Jan 06, 2009 at 02:02:29PM -0600, Serge E. Hallyn wrote: > Quoting Matt Helsley (matth...@us.ibm.com): > > We can often specify the UTS namespace to use when starting an RPC client. > > However sometimes no UTS namespace is available (specifically during system > > shutdown as the last NFS

[Devel] Re: [RFC][PATCH 2/4] sunrpc: Use utsnamespaces

2009-01-06 Thread J. Bruce Fields
On Tue, Jan 06, 2009 at 06:15:34PM -0500, Trond Myklebust wrote: > On Tue, 2009-01-06 at 15:04 -0800, Eric W. Biederman wrote: > > That implies to me you want to capture the value at mount time, and to > > pass it in to the rpc_call creation, and only at very specific well > > defined points where

[Devel] Re: [RFC][PATCH 2/4] sunrpc: Use utsnamespaces

2009-01-06 Thread J. Bruce Fields
On Tue, Jan 06, 2009 at 06:35:43PM -0500, Trond Myklebust wrote: > On Tue, 2009-01-06 at 18:32 -0500, J. Bruce Fields wrote: > > On Tue, Jan 06, 2009 at 06:15:34PM -0500, Trond Myklebust wrote: > > > On Tue, 2009-01-06 at 15:04 -0800, Eric W. Biederman wrote: > > > >

[Devel] Re: [RFC][PATCH 2/4] sunrpc: Use utsnamespaces

2009-01-06 Thread J. Bruce Fields
On Tue, Jan 06, 2009 at 04:08:50PM -0800, Matt Helsley wrote: > On Tue, 2009-01-06 at 17:42 -0500, Trond Myklebust wrote: > > On Tue, 2009-01-06 at 15:58 -0600, Serge E. Hallyn wrote: > > > > > So should we use patch 2/4, plus (as someone - was it you? - suggested) > > > using a DEFAULT instead of

[Devel] Re: [RFC][PATCH 2/4] sunrpc: Use utsnamespaces

2009-01-06 Thread J. Bruce Fields
On Tue, Jan 06, 2009 at 07:20:07PM -0500, Trond Myklebust wrote: > As for the NFSv4 clientid, I can't see how you would ever want to use > anything other than the init->utsname(), since the requirement is only > that the clientid string be unique and preserved across reboots. The > server isn't all

[Devel] Re: [RFC][PATCH 2/4] sunrpc: Use utsnamespaces

2009-01-06 Thread J. Bruce Fields
On Tue, Jan 06, 2009 at 07:38:26PM -0500, Trond Myklebust wrote: > On Tue, 2009-01-06 at 19:26 -0500, J. Bruce Fields wrote: > > On Tue, Jan 06, 2009 at 07:20:07PM -0500, Trond Myklebust wrote: > > > As for the NFSv4 clientid, I can't see how you would ever want to use &g

[Devel] Re: [PATCH] Memory shortage can result in inconsistent flocks state

2007-09-14 Thread J. Bruce Fields
On Thu, Sep 13, 2007 at 03:27:08PM -0400, Chuck Ebbert wrote: > On 09/11/2007 08:38 AM, Pavel Emelyanov wrote: > > diff --git a/fs/locks.c b/fs/locks.c > > index 0db1a14..f59d066 100644 > > --- a/fs/locks.c > > +++ b/fs/locks.c > > @@ -732,6 +732,14 @@ static int flock_lock_file(struct file * > >

[Devel] Re: [PATCH] Memory shortage can result in inconsistent flocks state

2007-09-14 Thread J. Bruce Fields
On Tue, Sep 11, 2007 at 04:38:13PM +0400, Pavel Emelyanov wrote: > This is a known feature that such "re-locking" is not atomic, > but in the racy case the file should stay locked (although by > some other process), but in this case the file will be unlocked. That's a little subtle (I assume you'v

[Devel] Re: [PATCH] Wake up mandatory locks waiter on chmod

2007-09-16 Thread J. Bruce Fields
On Thu, Sep 13, 2007 at 06:30:43PM +0400, Pavel Emelyanov wrote: > When the process is blocked on mandatory lock and someone changes > the inode's permissions, so that the lock is no longer mandatory, > nobody wakes up the blocked process, but probably should. I suppose so. Does anyone actually u

[Devel] Re: [PATCH] Wake up mandatory locks waiter on chmod

2007-09-17 Thread J. Bruce Fields
On Mon, Sep 17, 2007 at 10:37:56AM +0400, Pavel Emelyanov wrote: > J. Bruce Fields wrote: > > Is there a small chance that a lock may be applied after this check: > > > >> + mandatory = (inode->i_flock && MANDATORY_LOCK(inode)); > >> + > > &g

[Devel] Re: [PATCH] Wake up mandatory locks waiter on chmod (v2)

2007-09-18 Thread J. Bruce Fields
On Tue, Sep 18, 2007 at 10:33:26AM +0400, Pavel Emelyanov wrote: > Trond Myklebust wrote: > > IOW: the process that is waiting in locks_mandatory_area() will be > > released as soon as the advisory lock is dropped. If that theory is > > broken in practice, then that is the bug that we need to fix.

[Devel] Re: [PATCH] Wake up mandatory locks waiter on chmod (v2)

2007-09-18 Thread J. Bruce Fields
On Tue, Sep 18, 2007 at 12:14:55PM -0400, Trond Myklebust wrote: > Note also that strictly speaking, we're not even compliant with the > System V behaviour on read() and write(). See: > > http://www.unix.org.ua/orelly/networking_2ndEd/nfs/ch11_01.htm > and > > http://docs.sun.com/app/docs/doc

[Devel] Re: [PATCH] Wake up mandatory locks waiter on chmod (v2)

2007-09-18 Thread J. Bruce Fields
On Tue, Sep 18, 2007 at 12:54:56PM -0400, Trond Myklebust wrote: > On Tue, 2007-09-18 at 12:52 -0400, J. Bruce Fields wrote: > > So currently there's nothing to prevent this: > > > > - write passes locks_mandatory_area() checks &g

[Devel] Re: [PATCH] Wake up mandatory locks waiter on chmod

2007-09-19 Thread J. Bruce Fields
On Tue, Sep 18, 2007 at 10:36:32AM +0400, Pavel Emelyanov wrote: > J. Bruce Fields wrote: > > I would also prefer a locking scheme that didn't rely on the BKL. That > > said, except for this race: > > I would as well :) But I don't know the locking code good en

[Devel] Re: [PATCH] Consolidate sleeping routines in file locking code

2007-09-19 Thread J. Bruce Fields
On Tue, Sep 18, 2007 at 05:41:08PM +0400, Pavel Emelyanov wrote: > This is the next step in fs/locks.c cleanup before turning > it into using the struct pid *. > > This time I found, that there are some places that do a > similar thing - they try to apply a lock on a file and go > to sleep on er

[Devel] Re: [PATCH] Rework /proc/locks via seq_files and seq_list helpers

2007-09-19 Thread J. Bruce Fields
On Wed, Sep 19, 2007 at 03:35:27PM +0400, Pavel Emelyanov wrote: > Currently /proc/locks is shown with a proc_read function, but > its behavior is rather complex as it has to manually handle > current offset and buffer length. On the other hand, files > that show objects from lists can be easily r

[Devel] Re: [PATCH] Use list_first_entry in locks_wake_up_blocks

2007-09-19 Thread J. Bruce Fields
On Wed, Sep 19, 2007 at 04:44:07PM +0400, Pavel Emelyanov wrote: > This routine deletes all the elements from the list > with the "while (!list_empty())" loop, and we already > have a list_first_entry() macro to help it look nicer :) OK. --b. > > Signed-off-by: Pavel Emelyanov <[EMAIL PROTECTED

[Devel] Re: [PATCH] Fix potential OOPS in generic_setlease()

2007-09-19 Thread J. Bruce Fields
On Wed, Sep 19, 2007 at 06:26:05PM +0400, Pavel Emelyanov wrote: > This code is run under lock_kernel(), which is dropped during > sleeping operations, so the following race is possible: > > CPU1:CPU2: > vfs_setlease();vfs_setlease(); > lock_

[Devel] Re: [PATCH] Fix potential OOPS in generic_setlease() (v2)

2007-09-20 Thread J. Bruce Fields
unlock_kernel(); >locks_insert_lock(before, fl); >/* OOPS! We have just tried to add the lease > * at the tail of already removed one > */ > > The similar races are already handled in other code - all the > allocations are perfo

[Devel] Re: [PATCH] Consolidate sleeping routines in file locking code

2007-09-20 Thread J. Bruce Fields
On Thu, Sep 20, 2007 at 01:09:51PM +0400, Pavel Emelyanov wrote: > J. Bruce Fields wrote: > > On Tue, Sep 18, 2007 at 05:41:08PM +0400, Pavel Emelyanov wrote: > >> This is the next step in fs/locks.c cleanup before turning > >> it into using the struct pid *. > &

[Devel] [PATCH 1/2] Documentation: move mandatory locking documentation to filesystems/

2007-09-25 Thread J. Bruce Fields
ilesystems). Signed-off-by: J. Bruce Fields <[EMAIL PROTECTED]> --- On Tue, Sep 18, 2007 at 01:40:16PM -0400, bfields wrote: > Hm. Documentation/mandatory.txt claims that it mandatory locks and > mmap() with MAP_SHARED exclude each other, but I can't see where that's > e

[Devel] [PATCH 2/2] locks: add warning about mandatory locking races

2007-09-25 Thread J. Bruce Fields
The mandatory file locking implementation has long-standing races that probably render it useless. I know of no plans to fix them. Till we do, we should at least warn people. Signed-off-by: J. Bruce Fields <[EMAIL PROTECTED]> --- Documentation/filesystems/mandatory-locking.txt

[Devel] Re: [PATCH 1/2] Documentation: move mandatory locking documentation to filesystems/

2007-09-25 Thread J. Bruce Fields
On Tue, Sep 25, 2007 at 10:12:40AM -0700, Randy Dunlap wrote: > One correction below. ... > > --- a/Documentation/filesystems/00-INDEX > > +++ b/Documentation/filesystems/00-INDEX > > @@ -52,6 +52,8 @@ isofs.txt > > - info and mount options for the ISO 9660 (CDROM) filesystem. > > jfs.txt > >

[Devel] Re: [PATCH v3 00/16] make rpc_pipefs be mountable multiple time

2011-01-20 Thread J. Bruce Fields
On Thu, Jan 20, 2011 at 07:57:52AM -0600, Rob Landley wrote: > I've also mounted NFS shares in test environments I never mounted > rpc_pipefs in. (It's possible that the nfs.mount command was doing so > for me, and apparently unmounting it again afterwards.) My test > environment is exporting wit

[Devel] Re: [PATCH v3 00/16] make rpc_pipefs be mountable multiple time

2011-01-24 Thread J. Bruce Fields
On Tue, Jan 25, 2011 at 01:55:45AM +0200, Kirill A. Shutemov wrote: > On Fri, Jan 14, 2011 at 03:48:58PM +0200, Kirill A. Shutemov wrote: > > Prepare nfs/sunrpc stack to use multiple instances of rpc_pipefs. > > Only for client for now. > > > > It's step forwart to get nfs work from container. >

[Devel] Re: [PATCH v3 0/3] SUNRPC: rcbind clients virtualization

2011-10-27 Thread J. Bruce Fields
On Thu, Oct 27, 2011 at 10:10:43PM +0300, Stanislav Kinsbursky wrote: > v3: > 1) First two patches from previous version were squashed. > > This patch-set was created in context of clone of git branch: > git://git.linux-nfs.org/projects/trondmy/nfs-2.6.git > and rebased on tag "v3.1". > > This pa

[Devel] Re: [PATCH v6 4/8] SUNRPC: setup rpcbind clients if service requires it

2011-10-27 Thread J. Bruce Fields
On Tue, Oct 25, 2011 at 02:17:08PM +0300, Stanislav Kinsbursky wrote: > New function ("svc_uses_rpcbind") will be used to detect, that new service > will > send portmapper register calls. For such services we will create rpcbind > clients and remove all stale portmap registrations. > Also, svc_rpc

[Devel] Re: [PATCH v6 5/8] SUNRPC: cleanup service destruction

2011-10-27 Thread J. Bruce Fields
On Tue, Oct 25, 2011 at 02:17:18PM +0300, Stanislav Kinsbursky wrote: > svc_unregister() call have to be removed from svc_destroy() since it will be > called in sv_shutdown callback. It would be clearer that you're *moving* this if this were merged with the following patch. And without doing that

[Devel] Re: [PATCH v3 0/3] SUNRPC: rcbind clients virtualization

2011-10-28 Thread J. Bruce Fields
On Fri, Oct 28, 2011 at 01:24:45PM +0400, Stanislav Kinsbursky wrote: > This patch-set was created before you've sent your NFSd plan and we > disacussed Lockd per netns. > So, this sentence: "NFSd service will be per netns too from my pow" > is obsolete. And Lockd will be one for all. I believe lo

[Devel] Re: [PATCH v7 4/7] SUNRPC: setup rpcbind clients if service requires it

2011-10-28 Thread J. Bruce Fields
as portmap user. > Probably, this is wrong. But now it depends on program versions "vs_hidden" > flag. > > Signed-off-by: Stanislav Kinsbursky Acked-by: J. Bruce Fields > > --- > net/sunrpc/svc.c | 20 ++-- > 1 files changed, 14 inserti

[Devel] Re: [PATCH v7 0/7] SUNRPC: make rpcbind clients allocated and destroyed dynamically

2011-10-28 Thread J. Bruce Fields
On Fri, Oct 28, 2011 at 02:52:09PM +0300, Stanislav Kinsbursky wrote: > This patch-set was created in context of clone of git branch: > git://git.linux-nfs.org/projects/trondmy/nfs-2.6.git > and rebased on tag "v3.1". > > v7: > 1) Implemented "goto pattern" in __svc_create(). > 2) Pathes 5 and 6 f

[Devel] Re: [PATCH v7 3/7] SUNRPC: introduce svc helpers for prepairing rpcbind infrastructure

2011-10-28 Thread J. Bruce Fields
On Fri, Oct 28, 2011 at 02:52:59PM +0300, Stanislav Kinsbursky wrote: > This helpers will be used only for those services, that will send portmapper > registration calls. > > Signed-off-by: Stanislav Kinsbursky Acked-by: J. Bruce Fields > > --- > include/linux/sunrpc/cl

[Devel] Re: [PATCH v7 5/7] SUNRPC: cleanup service destruction

2011-10-28 Thread J. Bruce Fields
his function is registered as service shutdown > callback and thus nobody else will done it for us. > > Signed-off-by: Stanislav Kinsbursky Acked-by: J. Bruce Fields > > --- > fs/nfsd/nfssvc.c |2 ++ > include/linux/sunrpc/svc.h |1 + > net/sunrpc/sv

[Devel] Re: [PATCH v3 0/3] SUNRPC: rcbind clients virtualization

2011-11-04 Thread J. Bruce Fields
On Fri, Oct 28, 2011 at 01:41:49PM +0400, Stanislav Kinsbursky wrote: > 28.10.2011 13:30, J. Bruce Fields пишет: > >On Fri, Oct 28, 2011 at 01:24:45PM +0400, Stanislav Kinsbursky wrote: > >>This patch-set was created before you've sent your NFSd plan and we > >>di

[Devel] Re: [PATCH 0/6] SUNRPC: make RPC clients use network-namespace-aware PipeFS routines

2011-11-23 Thread J. Bruce Fields
On Wed, Nov 23, 2011 at 02:51:10PM +0300, Stanislav Kinsbursky wrote: > This patch set was created in context of clone of git > branch: git://git.linux-nfs.org/projects/trondmy/nfs-2.6.git. > tag: v3.1 > > This patch set depends on previous patch sets titled: > 1) "SUNRPC: initial part of making p

[Devel] Re: [PATCH 0/6] SUNRPC: make RPC clients use network-namespace-aware PipeFS routines

2011-11-23 Thread J. Bruce Fields
On Wed, Nov 23, 2011 at 02:51:10PM +0300, Stanislav Kinsbursky wrote: > This patch set was created in context of clone of git > branch: git://git.linux-nfs.org/projects/trondmy/nfs-2.6.git. > tag: v3.1 > > This patch set depends on previous patch sets titled: > 1) "SUNRPC: initial part of making p

[Devel] Re: [PATCH 4/5] NFS: remove RPC PipeFS mount point reference from blocklayout routines

2011-11-29 Thread J. Bruce Fields
On Tue, Nov 29, 2011 at 11:40:30AM -0500, Trond Myklebust wrote: > I mean that I'm perfectly entitled to do > > 'modprobe -r blocklayoutdriver' > > and when I do that, then I expect blkmapd to close the rpc pipe and wait > for a new one to be created just like rpc.idmapd and rpc.gssd do when I >

[Devel] Re: [PATCH 4/5] NFS: remove RPC PipeFS mount point reference from blocklayout routines

2011-11-29 Thread J. Bruce Fields
On Tue, Nov 29, 2011 at 12:19:25PM -0500, Trond Myklebust wrote: > On Tue, 2011-11-29 at 11:42 -0500, J. Bruce Fields wrote: > > On Tue, Nov 29, 2011 at 11:40:30AM -0500, Trond Myklebust wrote: > > > I mean that I'm perfectly entitled to do > > > >

[Devel] Re: [PATCH] SUNRPC: create svc_xprt in proper network namespace

2011-12-06 Thread J. Bruce Fields
On Tue, Dec 06, 2011 at 02:19:10PM +0300, Stanislav Kinsbursky wrote: > This patch makes svc_xprt inherit network namespace link from it's socket. And poor rdma gets left out. OK. Applying for 3.3 (with changelog typo fixed). --b. > > Signed-off-by: Stanislav Kinsbursky > > --- > include/l

[Devel] Re: [PATCH 1/2] SUNRPC: register RPC stats /proc entries in passed network namespace context

2011-12-06 Thread J. Bruce Fields
On Tue, Dec 06, 2011 at 04:42:40PM +0300, Stanislav Kinsbursky wrote: > This patch makes it possible to create NFS program entry ("/proc/net/rpc/nfs") > in passed network namespace context instead of hard-coded "init_net". Looks straightforward to me. Acked

[Devel] Re: [PATCH 2/2] SUNRPC: register service stats /proc entries in passed network namespace context

2011-12-06 Thread J. Bruce Fields
On Tue, Dec 06, 2011 at 04:42:49PM +0300, Stanislav Kinsbursky wrote: > This patch makes it possible to create NFSd program entry > ("/proc/net/rpc/nfsd") > in passed network namespace context instead of hard-coded "init_net". Acked-by: J. Bruce Fields

[Devel] Re: [PATCH 0/4] SUNRPC: pass network namespace context to sockaddr construction routines

2011-12-08 Thread J. Bruce Fields
On Wed, Dec 07, 2011 at 03:20:07PM +0300, Stanislav Kinsbursky wrote: > This is another precursor patch set aimed to remove hard-coded "init_net" > reference from SUNRPC sockaddr convertion and construction routines. ACK--all look straightforward. (Only complaint would be that this isn't terribly

[Devel] Re: [PATCH 1/4] SUNRPC: use passed network namespace context in rpc_parse_scope_id()

2011-12-08 Thread J. Bruce Fields
On Wed, Dec 07, 2011 at 03:20:16PM +0300, Stanislav Kinsbursky wrote: > Use incomming network context in rpc_parse_scope_id() instead of hard-coded Changelogs are a little confusing; I might have said "allow rpc_parse_cope_id() caller to pass in network context instead of using hard-code "init_net

[Devel] Re: [PATCH 1/4] SUNRPC: use passed network namespace context in rpc_parse_scope_id()

2011-12-12 Thread J. Bruce Fields
On Mon, Dec 12, 2011 at 08:03:45PM +0400, Stanislav Kinsbursky wrote: > 09.12.2011 00:47, J. Bruce Fields пишет: > >On Wed, Dec 07, 2011 at 03:20:16PM +0300, Stanislav Kinsbursky wrote: > >>Use incomming network context in rpc_parse_scope_id() instead of hard-coded > > &g

[Devel] Re: [PATCH 0/4] SUNRPC: pass network namespace context to sockaddr construction routines

2011-12-12 Thread J. Bruce Fields
On Mon, Dec 12, 2011 at 08:13:24PM +0400, Stanislav Kinsbursky wrote: > 09.12.2011 00:46, J. Bruce Fields пишет: > >On Wed, Dec 07, 2011 at 03:20:07PM +0300, Stanislav Kinsbursky wrote: > >>This is another precursor patch set aimed to remove hard-coded "init_net" > &

[Devel] Re: [PATCH 2/5] SUNRPC: create unix gid cache per network namespace

2012-01-19 Thread J. Bruce Fields
On Thu, Jan 19, 2012 at 06:49:14PM +0400, Stanislav Kinsbursky wrote: > This patch makes unix_gid_cache cache detail allocated and registered per > network namespace context. > Thus with this patch unix_gid_cache contents for network namespace "X" are > controlled from proc file system mount for th

[Devel] Re: [PATCH 3/5] SUNRPC: create GSS auth cache per network namespace

2012-01-19 Thread J. Bruce Fields
On Thu, Jan 19, 2012 at 06:49:23PM +0400, Stanislav Kinsbursky wrote: > @@ -1000,6 +996,7 @@ static int svcauth_gss_handle_init(struct svc_rqst > *rqstp, > struct xdr_netobj tmpobj; > struct rsi *rsip, rsikey; > int ret; > + struct sunrpc_net *sn = net_generic(rqstp->rq_xprt-

[Devel] Re: [PATCH 4/5] SUNRPC: ip map cache per network namespace cleanup

2012-01-19 Thread J. Bruce Fields
On Thu, Jan 19, 2012 at 06:49:31PM +0400, Stanislav Kinsbursky wrote: > This patch converts ip_map_cache per network namespace implemenetation to the > same view, as other caches done in the series. > Besides generalization, code becomes shorter with this patch. Again, isnt' it ip_map_cache, and n

[Devel] Re: [PATCH 3/5] SUNRPC: create GSS auth cache per network namespace

2012-01-19 Thread J. Bruce Fields
On Thu, Jan 19, 2012 at 09:04:40PM +0400, Stanislav Kinsbursky wrote: > 19.01.2012 20:31, J. Bruce Fields пишет: > >On Thu, Jan 19, 2012 at 06:49:23PM +0400, Stanislav Kinsbursky wrote: > >>@@ -1000,6 +996,7 @@ static int svcauth_gss_handle_init(struct svc_rqst > >

[Devel] Re: [PATCH 4/5] SUNRPC: ip map cache per network namespace cleanup

2012-01-19 Thread J. Bruce Fields
On Thu, Jan 19, 2012 at 09:10:08PM +0400, Stanislav Kinsbursky wrote: > 19.01.2012 20:37, J. Bruce Fields пишет: > >On Thu, Jan 19, 2012 at 06:49:31PM +0400, Stanislav Kinsbursky wrote: > >>This patch converts ip_map_cache per network namespace implemenetation to > >>

[Devel] Re: [PATCH v2 2/5] SUNRPC: create unix gid cache per network namespace

2012-01-19 Thread J. Bruce Fields
On Thu, Jan 19, 2012 at 09:42:29PM +0400, Stanislav Kinsbursky wrote: > v2: > 1) fixed silly usage of template cache as a real one (this code left from > static global cache for all) Looks good, thanks. --b. ___ Devel mailing list Devel@openvz.org http

[Devel] Re: [PATCH 0/5] SUNRPC: make caches network namespace aware

2012-01-19 Thread J. Bruce Fields
On Thu, Jan 19, 2012 at 10:19:52AM -0500, Trond Myklebust wrote: > On Thu, 2012-01-19 at 18:48 +0400, Stanislav Kinsbursky wrote: > > One more step towards to "NFS in container". > > With this patch set caches are allocated per network namespace. > > > > The following series consists of: > > > >

[Devel] Re: [PATCH] SUNRPC: search for service transports in network namespace context

2012-01-20 Thread J. Bruce Fields
On Fri, Jan 20, 2012 at 04:50:53PM +0400, Stanislav Kinsbursky wrote: > Service transports are parametrized by network namespace. And thus lookup of > transport instance have to take network namespace into account. > > Signed-off-by: Stanislav Kinsbursky Looks OK to me. Acked-

[Devel] Re: [PATCH RFC] SUNPRC: remove marking service temporary sockets with XPT_CHNGBUF

2012-01-20 Thread J. Bruce Fields
On Fri, Jan 20, 2012 at 04:55:39PM +0400, Stanislav Kinsbursky wrote: > This is a cleanup patch. > Service temporary sockets can be TCP or RDMA only. But XPT_CHNGBUF service > socket flag is checked only for UDP sockets on receive. > Thus (if I don't miss something non-obvious) this bit raising for

[Devel] Re: [PATCH 3/4] SUNRPC: service destruction in network namespace context

2012-01-26 Thread J. Bruce Fields
On Wed, Jan 25, 2012 at 05:47:26PM +0400, Stanislav Kinsbursky wrote: > This patch introduces network namespace filter for service destruction > function. > Nothing special here - just do exactly the same operations, but only for > tranports in passed networks namespace context. > BTW, BUG_ON() che

[Devel] Re: [PATCH 3/4] SUNRPC: service destruction in network namespace context

2012-01-27 Thread J. Bruce Fields
On Fri, Jan 27, 2012 at 01:08:06PM +0400, Stanislav Kinsbursky wrote: > 27.01.2012 01:14, J. Bruce Fields пишет: > >On Wed, Jan 25, 2012 at 05:47:26PM +0400, Stanislav Kinsbursky wrote: > >>This patch introduces network namespace filter for service destruction > >>fu

[Devel] Re: [PATCH 0/8] NFSd: precursor and cleanup patch set

2012-03-29 Thread J. Bruce Fields
On Wed, Mar 28, 2012 at 07:08:53PM +0400, Stanislav Kinsbursky wrote: > This patch set prepares ground for making NFSd export and expkey caches > allocated and registered per network namespace context. > Mainly, it just replaces hard-coded pointers with dereferenced everywhere > required. Thanks.

[Devel] Re: [PATCH 4/8] nfsd: use exp_put() for svc_export_cache put

2012-04-11 Thread J. Bruce Fields
On Wed, Mar 28, 2012 at 07:09:22PM +0400, Stanislav Kinsbursky wrote: > This patch replaces cache_put() call for svc_export_cache by exp_put() call. Patch looks fine. Minor peeve: the changelog doesn't tell me anything I couldn't figure out immediately from reading the patch. Tell me *why* we're

[Devel] Re: [PATCH 0/8] NFSd: precursor and cleanup patch set

2012-04-11 Thread J. Bruce Fields
On Wed, Mar 28, 2012 at 07:08:53PM +0400, Stanislav Kinsbursky wrote: > This patch set prepares ground for making NFSd export and expkey caches > allocated and registered per network namespace context. > Mainly, it just replaces hard-coded pointers with dereferenced everywhere > required. > > The

[Devel] Re: [PATCH v2] Lockd: pass network namespace to creation and destruction routines

2012-04-11 Thread J. Bruce Fields
On Thu, Mar 29, 2012 at 06:54:33PM +0400, Stanislav Kinsbursky wrote: > v2: dereference of most probably already released nlm_host removed in > nlmclnt_done() and reclaimer(). Did you want this in Trond's tree or mine? --b. > > These routines are called from locks reclaimer() kernel thread. Thi

[Devel] Re: [PATCH v2] Lockd: pass network namespace to creation and destruction routines

2012-04-11 Thread J. Bruce Fields
On Wed, Apr 11, 2012 at 08:12:04PM +0400, Stanislav Kinsbursky wrote: > 11.04.2012 20:11, J. Bruce Fields пишет: > >On Thu, Mar 29, 2012 at 06:54:33PM +0400, Stanislav Kinsbursky wrote: > >>v2: dereference of most probably already released nlm_host removed in > >>n

[Devel] Re: [PATCH] nfsd: remove hard-coded dereferences to name-to-id and id-to-name caches

2012-04-11 Thread J. Bruce Fields
On Wed, Apr 11, 2012 at 03:18:58PM +0400, Stanislav Kinsbursky wrote: > These dereferences to global static caches are redundant. They also prevents > converting these caches into per-net ones. So this patch is cleanup + > precursor > of patch set, which will make them per-net. This isn't applyin

[Devel] Re: [PATCH 2/4] nfsd: make export cache allocated per network namespace context

2012-04-11 Thread J. Bruce Fields
On Wed, Apr 11, 2012 at 03:13:21PM +0400, Stanislav Kinsbursky wrote: > This patch also changes prototypes of nfsd_export_flush() and exp_rootfh(): > network namespace parameter added. This also isn't applying cleanly for me. At this point I'm assuming any patches that aren't already applied to m

[Devel] Re: [PATCH v2] SUNRPC: skip dead but not buried clients on PipeFS events

2012-04-25 Thread J. Bruce Fields
On Fri, Apr 20, 2012 at 06:11:02PM +0400, Stanislav Kinsbursky wrote: > v2: atomic_inc_return() was replaced by atomic_inc_not_zero(). > > These clients can't be safely dereferenced if their counter in 0. I'm pretty confused by how these notifiers work rpc_release_client decrements cl_count

[Devel] Re: [PATCH 0/3] SUNRPC: three bugfixes for PipeFS event handling

2012-04-25 Thread J. Bruce Fields
On Fri, Apr 20, 2012 at 06:18:59PM +0400, Stanislav Kinsbursky wrote: > These bugfixes were caught (or noticed) due to the following simple script: I'm assuming Trond should take these (possibly for 3.4?). --b. > > == > > #!/b

[Devel] Re: [PATCH 0/3] SUNRPC: three bugfixes for PipeFS event handling

2012-04-25 Thread J. Bruce Fields
On Thu, Apr 26, 2012 at 12:59:07AM +0400, Stanislav Kinsbursky wrote: > 25.04.2012 22:24, J. Bruce Fields написал: > >On Fri, Apr 20, 2012 at 06:18:59PM +0400, Stanislav Kinsbursky wrote: > >>These bugfixes were caught (or noticed) due to the following simple script: > >I

[Devel] Re: [PATCH 2/3] SUNRPC: check rpcbind clients usage counter before decrement

2012-04-27 Thread J. Bruce Fields
On Wed, Apr 25, 2012 at 05:37:49PM +0400, Stanislav Kinsbursky wrote: > Registering service with svc_bind() can fail. In this case service will be > destroyed and during destruction it will try to unregister itself from > rpcbind. > In this case unregister have to be skipped. Isn't this a preexis

[Devel] Re: [PATCH 2/3] SUNRPC: check rpcbind clients usage counter before decrement

2012-04-30 Thread J. Bruce Fields
On Fri, Apr 27, 2012 at 06:08:13PM +0400, Stanislav Kinsbursky wrote: > On 27.04.2012 17:55, J. Bruce Fields wrote: > >On Wed, Apr 25, 2012 at 05:37:49PM +0400, Stanislav Kinsbursky wrote: > >>Registering service with svc_bind() can fail. In this case service will be > &

[Devel] Re: [PATCH v3 0/2] SUNRPC: separate per-net data creation from service

2012-05-02 Thread J. Bruce Fields
Thanks, applying. --b. On Wed, May 02, 2012 at 04:08:29PM +0400, Stanislav Kinsbursky wrote: > creation > > v3: "SUNRPC: new svc_bind() routine introduced" patch was squashed with the > "SUNRPC: check rpcbind clients usage counter before decrement" patch. > > v2: Increase per-net usage coun

[Devel] Re: [PATCH v3 0/2] SUNRPC: separate per-net data creation from service

2012-05-03 Thread J. Bruce Fields
On Wed, May 02, 2012 at 05:58:37PM -0400, J. Bruce Fields wrote: > Thanks, applying. Whoops, no--I'm hitting the BUG at net/sunrpc/svc.c:558 (the first of the two BUG_ON()s in svc_destroy()) when restarting nfsd. Could you look into this? --b. > > --b. > > On Wed, May 02

[Devel] Re: [PATCH 0/6] Lockd: service start cleanup patch set

2012-05-09 Thread J. Bruce Fields
On Wed, Apr 25, 2012 at 06:22:32PM +0400, Stanislav Kinsbursky wrote: > This patch set simplifies LockD start logic, makes code looks straight-forward > and clear. I've applied and pushed these out. I believe I now have everything from you except your latest grace-period handling rfc. Could you

[Devel] Re: [RFC PATCH] SUNRPC: protect service sockets lists during per-net shutdown

2012-05-16 Thread J. Bruce Fields
On Fri, May 11, 2012 at 03:41:56PM +0400, Stanislav Kinsbursky wrote: > Service sv_tempsocks and sv_permsocks lists are accessible by tasks with > different network namespaces, and thus per-net service destruction must be > protected. > These lists are protected by service sv_lock. So lets wrap lis

[Devel] Re: [PATCH RFC 00/13] Lockd: grace period containerization

2012-05-16 Thread J. Bruce Fields
On Sat, May 05, 2012 at 09:21:30PM +0400, Stanislav Kinsbursky wrote: > This patch set is marked with RFC, because I'm still not quite sure, that this > implementation will satisfy other interested people. > So, would be appreciated for any comments. > > This patch set makes grace period and hosts

[Devel] Re: [PATCH RFC 00/13] Lockd: grace period containerization

2012-05-16 Thread J. Bruce Fields
On Wed, May 16, 2012 at 04:06:30PM -0400, J. Bruce Fields wrote: > On Sat, May 05, 2012 at 09:21:30PM +0400, Stanislav Kinsbursky wrote: > > This patch set is marked with RFC, because I'm still not quite sure, that > > this > > implementation will satisfy other intereste

[Devel] Re: [PATCH] NFSd: fix locking in nfsd_forget_delegations()

2012-05-23 Thread J. Bruce Fields
On Tue, May 22, 2012 at 02:25:14PM +0400, Stanislav Kinsbursky wrote: > This patch adds recall_lock hold to nfsd_forget_delegations() to protect > nfsd_process_n_delegations() call. > Also, looks like it would be better to collect delegations to some local > on-stack list, and then unhash collected

[Devel] Re: [PATCH] NFSd: set nfsd_serv to NULL after service destruction

2012-05-23 Thread J. Bruce Fields
On Fri, May 18, 2012 at 07:26:02PM +0400, Stanislav Kinsbursky wrote: > Otherwise we will get NULL pointer dereference after > svc_shutdown_net->sv_shutdown (nfsd_last_thread) call. > This looks safe, because all such operations (svc_destroy) are performed with > nfsd_mutex being held. > > Signed-

[Devel] Re: [PATCH] NFSd: fix locking in nfsd_forget_delegations()

2012-05-24 Thread J. Bruce Fields
On Thu, May 24, 2012 at 08:41:35AM +0400, Stanislav Kinsbursky wrote: > 24.05.2012 01:31, J. Bruce Fields написал: > >On Tue, May 22, 2012 at 02:25:14PM +0400, Stanislav Kinsbursky wrote: > >>This patch adds recall_lock hold to nfsd_forget_delegations() to protect > >>

[Devel] Re: [PATCH v2 01/12] NFS: pass net to nfs_callback_down()

2012-05-24 Thread J. Bruce Fields
I can see that you're passing net to nfs_callback_down(). Could you please remind me why? What problem does this solve? --b. On Tue, May 22, 2012 at 11:35:55AM +0400, Stanislav Kinsbursky wrote: > Signed-off-by: Stanislav Kinsbursky > --- > fs/nfs/callback.c |4 ++-- > fs/nfs/callback.h |

[Devel] Re: [PATCH] NFS: hard-code init_net for NFS callback transports

2012-06-11 Thread J. Bruce Fields
On Fri, Jun 01, 2012 at 01:55:47PM +0400, Stanislav Kinsbursky wrote: > This patch set is a bug fix for Bruce's 3.5 branch. > I'll rebase this for 3.4 and resend. Apologies for neglecting this, I'm done with the bakeathon and should be back to this soon. But, I'm a bit confused: you say you'll re

[Devel] Re: [PATCH] NFS: hard-code init_net for NFS callback transports

2012-06-12 Thread J. Bruce Fields
On Mon, Jun 11, 2012 at 08:37:18AM -0400, J. Bruce Fields wrote: > On Fri, Jun 01, 2012 at 01:55:47PM +0400, Stanislav Kinsbursky wrote: > > This patch set is a bug fix for Bruce's 3.5 branch. > > I'll rebase this for 3.4 and resend. > > Apologies for neglecting th

[Devel] Re: [PATCH] NFS: hard-code init_net for NFS callback transports

2012-06-13 Thread J. Bruce Fields
On Wed, Jun 13, 2012 at 12:16:07PM +0400, Stanislav Kinsbursky wrote: > 12.06.2012 19:53, J. Bruce Fields написал: > >On Mon, Jun 11, 2012 at 08:37:18AM -0400, J. Bruce Fields wrote: > >>On Fri, Jun 01, 2012 at 01:55:47PM +0400, Stanislav Kinsbursky wrote: > >>>T

[Devel] Re: [PATCH v3] NFSd: set nfsd_serv to NULL after service destruction

2012-07-05 Thread J. Bruce Fields
On Tue, Jul 03, 2012 at 04:46:41PM +0400, Stanislav Kinsbursky wrote: > v3: > 1) Rebased for 3.6 kernel. > > v2: > 1) Set global nfsd_serv pointer to NULL only if no running threads left. > > Otherwise we will get NULL pointer dereference on last thread exit in > nfsd_last_thread(). > This patch

[Devel] Re: [PATCH v3] NFSd: set nfsd_serv to NULL after service destruction

2012-07-06 Thread J. Bruce Fields
On Fri, Jul 06, 2012 at 01:09:01PM +0400, Stanislav Kinsbursky wrote: > 06.07.2012 01:21, J. Bruce Fields пишет: > >On Tue, Jul 03, 2012 at 04:46:41PM +0400, Stanislav Kinsbursky wrote: > >>v3: > >>1) Rebased for 3.6 kernel. > >> > >>v2: > >

[Devel] Re: [PATCH] [RFC] nfsd: fix possible dereference of static NULL nfsd_serv pointer

2012-07-06 Thread J. Bruce Fields
On Fri, Jul 06, 2012 at 05:45:56PM +0400, Stanislav Kinsbursky wrote: > This is a bug fix for 3.5 kernel. > In case on NFSd service start failure svc_shutdown_net() will call svc_destroy > callback and zeroize global nfsd_serv pointer, this in turn will lead to Oops > in svc_destroy(). > > This pa

[Devel] Re: [PATCH] [RFC] nfsd: fix possible dereference of static NULL nfsd_serv pointer

2012-07-10 Thread J. Bruce Fields
On Sat, Jul 07, 2012 at 09:27:30AM +0400, Stanislav Kinsbursky wrote: > 06.07.2012 21:26, J. Bruce Fields пишет: > >On Fri, Jul 06, 2012 at 05:45:56PM +0400, Stanislav Kinsbursky wrote: > >>This is a bug fix for 3.5 kernel. > >>In case on NFSd service start failure s

[Devel] Re: [PATCH v2] NFSd: fix locking in nfsd_forget_delegations()

2012-07-12 Thread J. Bruce Fields
On Fri, May 25, 2012 at 06:38:50PM +0400, Stanislav Kinsbursky wrote: > v2: dl_recall_lru list is used for delegations collect because it's modified > both in unhash_delegation() and nfsd_break_one_deleg(). > > This patch adds recall_lock hold to nfsd_forget_delegations() to protect > nfsd_process

[Devel] Re: [PATCH v2] NFSd: simplify locking in nfsd_recall_delegations()

2012-07-18 Thread J. Bruce Fields
On Tue, Jul 03, 2012 at 05:02:24PM +0400, Stanislav Kinsbursky wrote: > v2: rebased on 3.5-rc3 kernel > > Holding of client_mutex looks redundant here - recall_lock looks enough. Yep, thanks.--b. > > Signed-off-by: Stanislav Kinsbursky > --- > fs/nfsd/nfs4state.c |2 -- > 1 files changed,

[Devel] Re: [PATCH v3] SUNRPC: protect service sockets lists during per-net shutdown

2012-07-24 Thread J. Bruce Fields
On Tue, Jul 03, 2012 at 04:58:57PM +0400, Stanislav Kinsbursky wrote: > v3: > 1) rebased on 3.5-rc3 kernel. > > v2: destruction of currently processing transport added: > 1) Added marking of currently processing transports with XPT_CLOSE on per-net > shutdown. These transports will be destroyed in

[Devel] Re: [PATCH v3 03/11] NFS: move per-net callback thread initialization to nfs_callback_up_net()

2012-07-24 Thread J. Bruce Fields
On Tue, Jul 03, 2012 at 08:19:46PM +0400, Stanislav Kinsbursky wrote: > This new function in now called before nfs_minorversion_callback_svc_setup()). > > Also few small changes: > 1) current network namespace in nfs_callback_up() was replaced by transport > net. > 2) svc_shutdown_net() was moved

[Devel] Re: [PATCH v3 00/11] Series short description

2012-07-24 Thread J. Bruce Fields
On Tue, Jul 03, 2012 at 08:19:23PM +0400, Stanislav Kinsbursky wrote: > v3: Rebased on Bruce's tree, "for-3.6" branch > > v2: Rebased on Bruce's tree, "for-3.5" branch Aside from the one question, this looks OK to me. I seem to recall this needed to go through my tree for some reason, but does T

[Devel] Re: [PATCH v2 09/15] NFSd: make nfsd4_manager allocated per network namespace context.

2012-07-27 Thread J. Bruce Fields
On Wed, Jul 25, 2012 at 04:56:58PM +0400, Stanislav Kinsbursky wrote: > Signed-off-by: Stanislav Kinsbursky > --- > fs/nfsd/netns.h |2 ++ > fs/nfsd/nfs4state.c | 32 +++- > 2 files changed, 21 insertions(+), 13 deletions(-) > > diff --git a/fs/nfsd/netns.h

[Devel] Re: [PATCH v2 00/15] Lockd: grace period containerization

2012-07-27 Thread J. Bruce Fields
On Wed, Jul 25, 2012 at 04:55:45PM +0400, Stanislav Kinsbursky wrote: > Bruce, I feel this patch set is ready for inclusion. > > v2: > 1) Rebase on Bruce's "for-3.6" branch. > > This patch set makes grace period and hosts reclaiming network namespace > aware. On a quick skim--yes, that looks rea

[Devel] Re: [PATCH v2 00/15] Lockd: grace period containerization

2012-07-31 Thread J. Bruce Fields
On Mon, Jul 30, 2012 at 02:03:57PM +0400, Stanislav Kinsbursky wrote: > 28.07.2012 01:54, J. Bruce Fields пишет: > >On Wed, Jul 25, 2012 at 04:55:45PM +0400, Stanislav Kinsbursky wrote: > >>Bruce, I feel this patch set is ready for inclusion. > >> > >>v2: >

[Devel] Re: [RFC PATCH 1/2] unix sockets: add ability for search for peer from passed root

2012-08-10 Thread J. Bruce Fields
On Fri, Aug 10, 2012 at 04:57:30PM +0400, Stanislav Kinsbursky wrote: > This helper is used stream sockets yet. > All is simple: if non-NULL struct path was passed to unix_find_other(), then > vfs_path_lookup() is called instead of kern_path(). I'm having some trouble parsing the changelog. Maybe

[Devel] Re: [RFC PATCH 0/2] net: connect to UNIX sockets from specified root

2012-08-10 Thread J. Bruce Fields
On Fri, Aug 10, 2012 at 07:26:28PM +0100, Alan Cox wrote: > > On that whole subject... > > > > Do we need a Unix domain socket equivalent to openat()? > > I don't think so. The name is just a file system indexing trick, it's not > really the socket proper. It's little more than "ascii string with

[Devel] Re: [RFC PATCH 0/2] net: connect to UNIX sockets from specified root

2012-08-13 Thread J. Bruce Fields
On Sat, Aug 11, 2012 at 03:15:24PM +0400, Stanislav Kinsbursky wrote: > 11.08.2012 10:23, Pavel Emelyanov пишет: > >On 08/11/2012 03:09 AM, H. Peter Anvin wrote: > >>On 08/10/2012 12:28 PM, Alan Cox wrote: > >>>Explicitly for Linux yes - this is not generally true of the AF_UNIX > >>>socket domain

[Devel] Re: [RFC PATCH 0/2] net: connect to UNIX sockets from specified root

2012-08-13 Thread J. Bruce Fields
On Mon, Aug 13, 2012 at 09:39:53PM +0400, Stanislav Kinsbursky wrote: > 13.08.2012 20:47, J. Bruce Fields пишет: > >On Sat, Aug 11, 2012 at 03:15:24PM +0400, Stanislav Kinsbursky wrote: > >>11.08.2012 10:23, Pavel Emelyanov пишет: > >>>On 08/11/2012 03:09 AM, H. Pet

[Devel] Re: [RFC PATCH 0/5] net: socket bind to file descriptor introduced

2012-08-16 Thread J. Bruce Fields
On Wed, Aug 15, 2012 at 08:03:24PM -0700, Eric W. Biederman wrote: > Stanislav Kinsbursky writes: > > > This patch set introduces new socket operation and new system call: > > sys_fbind(), which allows to bind socket to opened file. > > File to bind to can be created by sys_mknod(S_IFSOCK) and op

  1   2   >