Pull all the deferred request logic up into the generic code so
that transport-specified code does not need to be aware of it.
Signed-off-by: Greg Banks <[email protected]>
---
net/sunrpc/svcsock.c | 14 ++++----------
1 files changed, 4 insertions(+), 10 deletions(-)
Index: linux/net/sunrpc/svcsock.c
===================================================================
--- linux.orig/net/sunrpc/svcsock.c 2007-05-23 21:39:49.835887107 +1000
+++ linux/net/sunrpc/svcsock.c 2007-05-23 21:40:00.030560270 +1000
@@ -754,11 +754,6 @@ svc_udp_recvfrom(struct svc_rqst *rqstp)
(serv->sv_nrthreads+3) * serv->sv_max_mesg,
(serv->sv_nrthreads+3) * serv->sv_max_mesg);
- if ((rqstp->rq_deferred = svc_deferred_dequeue(svsk))) {
- svc_sock_received(svsk);
- return svc_deferred_recv(rqstp);
- }
-
svc_sock_clear_data_ready(svsk);
while ((err = kernel_recvmsg(svsk->sk_sock, &msg, NULL,
0, 0, MSG_PEEK | MSG_DONTWAIT)) < 0 ||
@@ -1153,11 +1148,6 @@ svc_tcp_recvfrom(struct svc_rqst *rqstp)
test_bit(SK_CONN, &svsk->sk_flags),
test_bit(SK_CLOSE, &svsk->sk_flags));
- if ((rqstp->rq_deferred = svc_deferred_dequeue(svsk))) {
- svc_sock_received(svsk);
- return svc_deferred_recv(rqstp);
- }
-
if (test_and_clear_bit(SK_CHNGBUF, &svsk->sk_flags))
/* sndbuf needs to have room for one request
* per thread, otherwise we can stall even when the
@@ -1538,6 +1528,10 @@ svc_recv(struct svc_rqst *rqstp, long ti
} else if (test_bit(SK_LISTENER, &svsk->sk_flags)) {
svsk->sk_type->st_accept(svsk);
svc_sock_received(svsk);
+ } else if ((rqstp->rq_deferred = svc_deferred_dequeue(svsk))) {
+ dprintk("svc: rqstp=%p got deferred request on svsk=%p\n", rqstp, svsk);
+ svc_sock_received(svsk);
+ len = svc_deferred_recv(rqstp);
} else {
dprintk("svc: server %p, pool %u, socket %p, inuse=%d\n",
rqstp, pool->sp_id, svsk, atomic_read(&svsk->sk_inuse));
--
Greg Banks, R&D Software Engineer, SGI Australian Software Group.
Apparently, I'm Bedevere. Which MPHG character are you?
I don't speak for SGI.
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs