Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-5]: src/sys/nfs Pullup 1.45 [chs]:



details:   https://anonhg.NetBSD.org/src/rev/64643265d49c
branches:  netbsd-1-5
changeset: 489978:64643265d49c
user:      tv <tv%NetBSD.org@localhost>
date:      Tue Oct 24 04:17:49 2000 +0000

description:
Pullup 1.45 [chs]:
fix nfs iod management so we don't lose i/os when iods die.

diffstat:

 sys/nfs/nfs_syscalls.c |  17 +++++++++--------
 1 files changed, 9 insertions(+), 8 deletions(-)

diffs (40 lines):

diff -r 2d406ecf6137 -r 64643265d49c sys/nfs/nfs_syscalls.c
--- a/sys/nfs/nfs_syscalls.c    Sun Oct 22 19:04:50 2000 +0000
+++ b/sys/nfs/nfs_syscalls.c    Tue Oct 24 04:17:49 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: nfs_syscalls.c,v 1.41 2000/06/09 00:00:18 fvdl Exp $   */
+/*     $NetBSD: nfs_syscalls.c,v 1.41.2.1 2000/10/24 04:17:49 tv Exp $ */
 
 /*
  * Copyright (c) 1989, 1993
@@ -949,13 +949,7 @@
                error = tsleep((caddr_t)&nfs_iodwant[myiod],
                        PWAIT | PCATCH, "nfsidl", 0);
            }
-           if (error) {
-               if (nmp)
-                   nmp->nm_bufqiods--;
-               nfs_iodmount[myiod] = NULL;
-               break;
-           }
-           while ((bp = nmp->nm_bufq.tqh_first) != NULL) {
+           while (nmp != NULL && (bp = nmp->nm_bufq.tqh_first) != NULL) {
                /* Take one off the front of the list */
                TAILQ_REMOVE(&nmp->nm_bufq, bp, b_freelist);
                nmp->nm_bufqlen--;
@@ -977,8 +971,15 @@
                    break;
                }
            }
+           if (error) {
+                   break;
+           }
        }
        p->p_holdcnt--;
+       if (nmp)
+               nmp->nm_bufqiods--;
+       nfs_iodwant[myiod] = NULL;
+       nfs_iodmount[myiod] = NULL;
        nfs_asyncdaemon[myiod] = NULL;
        nfs_numasync--;
 



Home | Main Index | Thread Index | Old Index