Source-Changes-HG archive

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

[src/netbsd-1-4]: src/sys/nfs Pull up revision 1.45 (via patch, requested by ...



details:   https://anonhg.NetBSD.org/src/rev/1cf9abe84ffd
branches:  netbsd-1-4
changeset: 471182:1cf9abe84ffd
user:      he <he%NetBSD.org@localhost>
date:      Wed Oct 25 17:18:29 2000 +0000

description:
Pull up revision 1.45 (via patch, requested by chs):
  Fix a bug where NFS async I/O requests will be lost if the number
  of I/O daemons is ever reduced to a smaller but non-zero number.

diffstat:

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

diffs (40 lines):

diff -r 3deabda9a3ac -r 1cf9abe84ffd sys/nfs/nfs_syscalls.c
--- a/sys/nfs/nfs_syscalls.c    Wed Oct 25 17:11:48 2000 +0000
+++ b/sys/nfs/nfs_syscalls.c    Wed Oct 25 17:18:29 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: nfs_syscalls.c,v 1.33.6.1 1999/05/04 17:07:15 perry Exp $      */
+/*     $NetBSD: nfs_syscalls.c,v 1.33.6.2 2000/10/25 17:18:29 he Exp $ */
 
 /*
  * Copyright (c) 1989, 1993
@@ -961,13 +961,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--;
@@ -989,8 +983,15 @@
                    break;
                }
            }
+           if (error) {
+               break;
+           }
        }
        p->p_holdcnt--;
+       if (nmp)
+               nmp->nm_bufqiods--;
+       nfs_iodwant[myiod] = NULL;
+       nfs_iodmount[myiod] = NULL;
        nfs_asyncdaemon[myiod] = 0;
        nfs_numasync--;
        return (error);



Home | Main Index | Thread Index | Old Index