]> git.karo-electronics.de Git - linux-beck.git/commitdiff
nfsd41: Backchannel: Server backchannel RPC wait queue
authorRicardo Labiaga <Ricardo.Labiaga@netapp.com>
Thu, 10 Sep 2009 09:26:25 +0000 (12:26 +0300)
committerJ. Bruce Fields <bfields@citi.umich.edu>
Wed, 16 Sep 2009 00:49:55 +0000 (20:49 -0400)
RPC callback requests will wait on this wait queue if the backchannel
is out of slots.

Signed-off-by: Ricardo Labiaga <Ricardo.Labiaga@netapp.com>
Signed-off-by: Benny Halevy <bhalevy@panasas.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
fs/nfsd/nfs4state.c
include/linux/nfsd/state.h

index d8196b453f616e6e29f610c48981654653a1051e..f4cebd9016bc3f77771517d317973a007eabdd3c 100644 (file)
@@ -775,6 +775,8 @@ static struct nfs4_client *create_client(struct xdr_netobj name, char *recdir)
        INIT_LIST_HEAD(&clp->cl_delegations);
        INIT_LIST_HEAD(&clp->cl_sessions);
        INIT_LIST_HEAD(&clp->cl_lru);
+       clear_bit(0, &clp->cl_cb_slot_busy);
+       rpc_init_wait_queue(&clp->cl_cb_waitq, "Backchannel slot table");
        return clp;
 }
 
index 0e5b5aecde03dd21b163e95f3611dba2cb332942..9cc40a137c340edee76308235113ca5ded7f555a 100644 (file)
@@ -219,7 +219,11 @@ struct nfs4_client {
        struct nfs4_sessionid   cl_sessionid;
 
        /* for nfs41 callbacks */
+       /* We currently support a single back channel with a single slot */
+       unsigned long           cl_cb_slot_busy;
        struct svc_xprt         *cl_cb_xprt;    /* 4.1 callback transport */
+       struct rpc_wait_queue   cl_cb_waitq;    /* backchannel callers may */
+                                               /* wait here for slots */
 };
 
 /* struct nfs4_client_reset