From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Morton Subject: Re: [PATCH 08/21] NFS: Add a lookupfh NFS RPC op Date: Thu, 6 Jul 2006 18:31:45 -0700 Message-ID: <20060706183145.51361cc6.akpm@osdl.org> References: <20060706145424.18779.55583.stgit@lade.trondhjem.org> <20060706151039.18779.57722.stgit@lade.trondhjem.org> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: linux-fsdevel@vger.kernel.org, David Howells Return-path: Received: from smtp.osdl.org ([65.172.181.4]:36843 "EHLO smtp.osdl.org") by vger.kernel.org with ESMTP id S1750821AbWGGBcB (ORCPT ); Thu, 6 Jul 2006 21:32:01 -0400 To: Trond Myklebust In-Reply-To: <20060706151039.18779.57722.stgit@lade.trondhjem.org> Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Thu, 06 Jul 2006 11:10:39 -0400 Trond Myklebust wrote: > From: David Howells > > Add a lookup filehandle NFS RPC op so that a file handle can be looked up > without requiring dentries and inodes and other VFS stuff when doing an NFS4 > pathwalk during mounting. > > Signed-Off-By: David Howells > Signed-off-by: Trond Myklebust > --- > > fs/nfs/nfs4proc.c | 47 +++++++++++++++++++++++++++++++++++++++++++++++ > include/linux/nfs_xdr.h | 3 +++ > 2 files changed, 50 insertions(+), 0 deletions(-) > > diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c > index eff6043..7fa2938 100644 > --- a/fs/nfs/nfs4proc.c > +++ b/fs/nfs/nfs4proc.c > @@ -1583,6 +1583,52 @@ nfs4_proc_setattr(struct dentry *dentry, > return status; > } > > +static int _nfs4_proc_lookupfh(struct nfs_server *server, struct nfs_fh *dirfh, > + struct qstr *name, struct nfs_fh *fhandle, > + struct nfs_fattr *fattr) > +{ > + int status; > + struct nfs4_lookup_arg args = { > + .bitmask = server->attr_bitmask, > + .dir_fh = dirfh, > + .name = name, > + }; > + struct nfs4_lookup_res res = { > + .server = server, > + .fattr = fattr, > + .fh = fhandle, > + }; > + struct rpc_message msg = { > + .rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_LOOKUP], > + .rpc_argp = &args, > + .rpc_resp = &res, > + }; If this is called with any frequency then we might want to take a look at the code generation quality. gcc doesn't do this well.