Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/nfs nfs_request: fix races which break congestion window...
details: https://anonhg.NetBSD.org/src/rev/bbd49a6e16b5
branches: trunk
changeset: 750935:bbd49a6e16b5
user: yamt <yamt%NetBSD.org@localhost>
date: Tue Jan 19 13:39:04 2010 +0000
description:
nfs_request: fix races which break congestion window and make nfs client stuck.
diffstat:
sys/nfs/nfs_socket.c | 14 +++++++++-----
1 files changed, 9 insertions(+), 5 deletions(-)
diffs (51 lines):
diff -r 9f67b8910756 -r bbd49a6e16b5 sys/nfs/nfs_socket.c
--- a/sys/nfs/nfs_socket.c Tue Jan 19 13:29:40 2010 +0000
+++ b/sys/nfs/nfs_socket.c Tue Jan 19 13:39:04 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nfs_socket.c,v 1.184 2009/12/31 19:31:31 christos Exp $ */
+/* $NetBSD: nfs_socket.c,v 1.185 2010/01/19 13:39:04 yamt Exp $ */
/*
* Copyright (c) 1989, 1991, 1993, 1995
@@ -39,7 +39,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nfs_socket.c,v 1.184 2009/12/31 19:31:31 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nfs_socket.c,v 1.185 2010/01/19 13:39:04 yamt Exp $");
#ifdef _KERNEL_OPT
#include "fs_nfs.h"
@@ -1133,10 +1133,14 @@
if (nmp->nm_soflags & PR_CONNREQUIRED)
nfs_sndunlock(nmp);
}
+ s = splsoftnet();
if (!error && (rep->r_flags & R_MUSTRESEND) == 0) {
- nmp->nm_sent += NFS_CWNDSCALE;
- rep->r_flags |= R_SENT;
+ if ((rep->r_flags & R_SENT) == 0) {
+ nmp->nm_sent += NFS_CWNDSCALE;
+ rep->r_flags |= R_SENT;
+ }
}
+ splx(s);
} else {
splx(s);
rep->r_rtt = -1;
@@ -1153,7 +1157,6 @@
*/
s = splsoftnet();
TAILQ_REMOVE(&nfs_reqq, rep, r_chain);
- splx(s);
/*
* Decrement the outstanding request count.
@@ -1162,6 +1165,7 @@
rep->r_flags &= ~R_SENT; /* paranoia */
nmp->nm_sent -= NFS_CWNDSCALE;
}
+ splx(s);
if (rexmitp != NULL) {
int rexmit;
Home |
Main Index |
Thread Index |
Old Index