Source-Changes-HG archive

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

[src/trunk]: src/sys/nfs In nfs_flush, if the previous commit succeeded and w...



details:   https://anonhg.NetBSD.org/src/rev/a9d72dc6eeba
branches:  trunk
changeset: 486572:a9d72dc6eeba
user:      enami <enami%NetBSD.org@localhost>
date:      Thu May 25 23:28:44 2000 +0000

description:
In nfs_flush, if the previous commit succeeded and we may have more
uncommitted dirty buffer, attempt to commit them.

diffstat:

 sys/nfs/nfs_vnops.c |  13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diffs (41 lines):

diff -r ec7e6b7453ab -r a9d72dc6eeba sys/nfs/nfs_vnops.c
--- a/sys/nfs/nfs_vnops.c       Thu May 25 23:02:53 2000 +0000
+++ b/sys/nfs/nfs_vnops.c       Thu May 25 23:28:44 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: nfs_vnops.c,v 1.111 2000/03/30 13:44:53 augustss Exp $ */
+/*     $NetBSD: nfs_vnops.c,v 1.112 2000/05/25 23:28:44 enami Exp $    */
 
 /*
  * Copyright (c) 1989, 1993
@@ -2746,7 +2746,7 @@
        struct nfsmount *nmp = VFSTONFS(vp->v_mount);
        int s, error = 0, slptimeo = 0, slpflag = 0, retv, bvecpos;
        int passone = 1;
-       u_quad_t off = (u_quad_t)-1, endoff = 0, toff;
+       u_quad_t off, endoff, toff;
        struct ucred* wcred = NULL;
 #ifndef NFS_COMMITBVECSIZ
 #define NFS_COMMITBVECSIZ      20
@@ -2766,6 +2766,8 @@
         */
 again:
        bvecpos = 0;
+       off = (u_quad_t)-1;
+       endoff = 0;
        if (NFS_ISV3(vp) && commit) {
                s = splbio();
                for (bp = vp->v_dirtyblkhd.lh_first; bp; bp = nbp) {
@@ -2851,6 +2853,13 @@
                            biodone(bp);
                        }
                }
+
+               /*
+                * If commit succeeded and we haven't walked through
+                * all dirty buffers, try to commit more.
+                */
+               if (retv == 0 && bvecpos == NFS_COMMITBVECSIZ)
+                       goto again;
        }
 
        /*



Home | Main Index | Thread Index | Old Index