Source-Changes-HG archive

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

[src/trunk]: src/sys/nfs - Try to commit another buffer even if previous comm...



details:   https://anonhg.NetBSD.org/src/rev/acc2c08f3d22
branches:  trunk
changeset: 486594:acc2c08f3d22
user:      enami <enami%NetBSD.org@localhost>
date:      Fri May 26 08:36:48 2000 +0000

description:
- Try to commit another buffer even if previous commit failed except the
  case that write verf is changed.  Suggested by mycroft%netbsd.org@localhost.
- Reset wcred to NULL (i.e., write credential isn't decieded) everytime
  before gathering buffer for new commit, so that there is a chance to
  the commit request is merged.

diffstat:

 sys/nfs/nfs_vnops.c |  12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diffs (41 lines):

diff -r a19521a14139 -r acc2c08f3d22 sys/nfs/nfs_vnops.c
--- a/sys/nfs/nfs_vnops.c       Fri May 26 06:32:56 2000 +0000
+++ b/sys/nfs/nfs_vnops.c       Fri May 26 08:36:48 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: nfs_vnops.c,v 1.112 2000/05/25 23:28:44 enami Exp $    */
+/*     $NetBSD: nfs_vnops.c,v 1.113 2000/05/26 08:36:48 enami Exp $    */
 
 /*
  * Copyright (c) 1989, 1993
@@ -2747,7 +2747,7 @@
        int s, error = 0, slptimeo = 0, slpflag = 0, retv, bvecpos;
        int passone = 1;
        u_quad_t off, endoff, toff;
-       struct ucred* wcred = NULL;
+       struct ucred* wcred;
 #ifndef NFS_COMMITBVECSIZ
 #define NFS_COMMITBVECSIZ      20
 #endif
@@ -2768,6 +2768,7 @@
        bvecpos = 0;
        off = (u_quad_t)-1;
        endoff = 0;
+       wcred = NULL;
        if (NFS_ISV3(vp) && commit) {
                s = splbio();
                for (bp = vp->v_dirtyblkhd.lh_first; bp; bp = nbp) {
@@ -2855,10 +2856,11 @@
                }
 
                /*
-                * If commit succeeded and we haven't walked through
-                * all dirty buffers, try to commit more.
+                * If there may be more uncommitted buffer, try to
+                * commit them unless write verf isn't changed.
                 */
-               if (retv == 0 && bvecpos == NFS_COMMITBVECSIZ)
+               if (retv != NFSERR_STALEWRITEVERF &&
+                   bvecpos == NFS_COMMITBVECSIZ)
                        goto again;
        }
 



Home | Main Index | Thread Index | Old Index