lkml.org 
[lkml]   [2004]   [Apr]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 11/11] nfs-acl
From
Date
On Tue, 2004-04-27 at 13:33, Andreas Gruenbacher wrote:

> We can share the same socket, but the code gets slightly messier. How
> about sharing the whole struct rpc_xprt (incremental patch)?

How about doing it as I suggested, using rpc_clone_client() instead?

You'll need to add

void rpc_change_program(struct rpc_client *clnt, struct rpc_program *program, int vers)
{
struct rpc_version *version;

BUG_ON(vers >= program->nrvers || !(version = program->version[vers]));
version = &program->version[vers];
clnt->cl_procinfo = version->procs;
clnt->cl_maxproc = version->nrprocs;
clnt->cl_protname = program->name;
clnt->cl_prog = program->number;
clnt->cl_vers = version->number;
clnt->cl_stats = program->stats
}

...but that will allow you to do the whole process of creating the ACL
RPC client in 2 lines:

struct rpc_client *aclclnt = rpc_clone_client(server->client);
rpc_change_program(aclclnt, &nfsacl_program, 1);


...and hey presto, you have something that shares both the
authentication cache and the socket with the NFS client.

Cheers,
Trond
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:02    [W:0.058 / U:0.152 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site