On Thu, 06 Jul 2006 11:10:39 -0400 Trond Myklebust <Trond.Myklebust@xxxxxxxxxx> wrote: > From: David Howells <dhowells@xxxxxxxxxx> > > 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 <dhowells@xxxxxxxxxx> > Signed-off-by: Trond Myklebust <Trond.Myklebust@xxxxxxxxxx> > --- > > 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. - To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html