[pnfs] [PATCH 05/10] nfs41: NFSv4.1 callback structures
Ricardo Labiaga
ricardo.labiaga at netapp.com
Wed Jan 2 20:10:44 EST 2008
On Wed, 2008-01-02 at 19:21 -0500, J. Bruce Fields wrote:
> On Wed, Jan 02, 2008 at 04:01:46PM -0800, Ricardo Labiaga wrote:
> > Adds new pointer to the rpc_xprt structure. Used to preallocate resources for
> > the backchannel and allocate backchannel requests. Callbacks are not expected
> > to cause significant latency, so only one callback will be allowed at a time.
>
> That's one callback per rpc_xprt? (So roughly one per mounted nfsv4.1
> server?)
>
Yes, that's correct, one callback per rpc_xprt. Although I believe your
question just uncovered a bug. The premise is that the client is able
to tell the server the number of backchannels it supports during session
negotiation. I believe I have a problem where that a single rpc_xprt
can be shared by more than one session (I need to verify this). If this
is true, then I have to figured out a different place to hang the
pre-allocated resources.
- ricardo
> --b.
>
> >
> > Signed-off-by: Ricardo Labiaga <ricardo.labiaga at netapp.com>
> > ---
> > include/linux/sunrpc/xprt.h | 14 +++++++++++++-
> > 1 files changed, 13 insertions(+), 1 deletions(-)
> >
> > diff --git a/include/linux/sunrpc/xprt.h b/include/linux/sunrpc/xprt.h
> > index b64d8df..6777793 100644
> > --- a/include/linux/sunrpc/xprt.h
> > +++ b/include/linux/sunrpc/xprt.h
> > @@ -170,7 +170,12 @@ struct rpc_xprt {
> > struct rpc_task * snd_task; /* Task blocked in send */
> > #if defined(CONFIG_NFSD_V4_1)
> > struct svc_sock *svsk; /* If this is a callback xprt */
> > -#endif
> > +#endif /* CONFIG_NFSD_V4_1 */
> > +#if defined(CONFIG_NFS_V4_1)
> > + struct svc_serv *serv; /* The RPC service which will process the callback request */
> > + unsigned long bc_flags; /* Backchannel flags */
> > + struct rpc_rqst *bc_rpc_rqst; /* Preallocated backchannel rpc_rqst */
> > +#endif /* CONFIG_NFS_V4_1 */
> > struct list_head recv;
> >
> > struct {
> > @@ -189,6 +194,13 @@ struct rpc_xprt {
> > char * address_strings[RPC_DISPLAY_MAX];
> > };
> >
> > +#if defined(CONFIG_NFS_V4_1)
> > +/*
> > + * Backchannel flags
> > + */
> > +#define RPC_BC_PREALLOC_IN_USE 0x0001 /* Preallocated backchannel buffers in use */
> > +#endif /* CONFIG_NFS_V4_1 */
> > +
> > struct xprt_create {
> > int ident; /* XPRT_TRANSPORT identifier */
> > struct sockaddr * srcaddr; /* optional local address */
> > --
> > 1.5.3.3
> > _______________________________________________
> > pNFS mailing list
> > pNFS at linux-nfs.org
> > http://linux-nfs.org/cgi-bin/mailman/listinfo/pnfs
More information about the pNFS
mailing list