mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Trond Myklebust <trond.myklebust@fys.uio.no>
To: Andreas Gruenbacher <agruen@suse.de>
Cc: lkml <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 11/11] nfs-acl
Date: Tue, 27 Apr 2004 13:54:20 -0400	[thread overview]
Message-ID: <1083088460.2616.65.camel@lade.trondhjem.org> (raw)
In-Reply-To: <1083087180.19655.263.camel@winden.suse.de>

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

      reply	other threads:[~2004-04-27 17:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-26 10:28 Andreas Gruenbacher
2004-04-26 21:10 ` Trond Myklebust
2004-04-27 17:33   ` Andreas Gruenbacher
2004-04-27 17:54     ` Trond Myklebust [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1083088460.2616.65.camel@lade.trondhjem.org \
    --to=trond.myklebust@fys.uio.no \
    --cc=agruen@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®