From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1763552AbZCaWr1 (ORCPT ); Tue, 31 Mar 2009 18:47:27 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1757344AbZCaWrP (ORCPT ); Tue, 31 Mar 2009 18:47:15 -0400 Received: from smtp1.linux-foundation.org ([140.211.169.13]:59322 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753592AbZCaWrN (ORCPT ); Tue, 31 Mar 2009 18:47:13 -0400 Date: Tue, 31 Mar 2009 15:43:14 -0700 (PDT) From: Linus Torvalds X-X-Sender: torvalds@localhost.localdomain To: Trond Myklebust cc: linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, viro@zeniv.linux.org.uk, hch@infradead.org Subject: Re: [PATCH 1/4] VFS: Add a VFS helper function vfs_remote_path_lookup() In-Reply-To: <1238539079.28445.103.camel@heimdal.trondhjem.org> Message-ID: References: <3f1264127d431f695be25b940b477e3d287edc68.1238525532.git.Trond.Myklebust@netapp.com> <1238539079.28445.103.camel@heimdal.trondhjem.org> User-Agent: Alpine 2.00 (LFD 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 31 Mar 2009, Trond Myklebust wrote: > > No. The main purpose is to able to look up and walk down an NFSv4 mount > path, which is a path on the _server_'s file/directory namespace. Sure, but that's not the "swizzle" part. If it was just abotu the namespace part, then you'd just do one namespace per server, and be done with it. So if you split that function up into a sepate - allocate namespace for nfsd - free nfsd namespace - do the lookup then really _all_ the extraneous code comes just from that "playing games with it" swizzling part. > > And I think it's positively _wrong_ to have a function that creates and > > destroys the whole "struct fs_struct" and a namespace for just one call. > > Even if you don't think it's at all performance-critical, the interface is > > too damn ugly. Have separate "create/destroy context" functions, so that > > you _can_ do it just once, and have multiple calls in between. > > That can probably be done, but the main reason for having the namespace > was to be able, once the sys_mount() is complete, to garbage collect and > get rid of those autogenerated mount points that are not user visible. So there is never any reason to do that nfsd-specific pathwalk at run-time? There are no "server pwd" requests that clients can do? Linus