Source-Changes-HG archive

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

[src/trunk]: src/sys/ufs/ufs process one block at a time even when we're usin...



details:   https://anonhg.NetBSD.org/src/rev/7f1ff41a3e93
branches:  trunk
changeset: 515630:7f1ff41a3e93
user:      chs <chs%NetBSD.org@localhost>
date:      Sun Sep 30 02:50:35 2001 +0000

description:
process one block at a time even when we're using the write fast path
that avoids zeroing pages.  this avoids a mess when we get ENOSPC and
softdeps are enabled.

diffstat:

 sys/ufs/ufs/ufs_readwrite.c |  12 +++---------
 1 files changed, 3 insertions(+), 9 deletions(-)

diffs (46 lines):

diff -r 2df8396cdf1d -r 7f1ff41a3e93 sys/ufs/ufs/ufs_readwrite.c
--- a/sys/ufs/ufs/ufs_readwrite.c       Sun Sep 30 02:36:42 2001 +0000
+++ b/sys/ufs/ufs/ufs_readwrite.c       Sun Sep 30 02:50:35 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ufs_readwrite.c,v 1.34 2001/09/16 13:57:56 chs Exp $   */
+/*     $NetBSD: ufs_readwrite.c,v 1.35 2001/09/30 02:50:35 chs Exp $   */
 
 /*-
  * Copyright (c) 1993
@@ -205,7 +205,6 @@
        int ubc_alloc_flags;
        void *win;
        vsize_t bytelen;
-       boolean_t alloced;
        boolean_t usepc = FALSE;
 
        cred = ap->a_cred;
@@ -293,7 +292,6 @@
                }
        }
 
-       alloced = FALSE;
        ubc_alloc_flags = UBC_WRITE;
        origoff = uio->uio_offset;
        while (uio->uio_resid > 0) {
@@ -317,18 +315,14 @@
                                break;
                        }
                        ubc_alloc_flags &= ~UBC_FAULTBUSY;
-               } else if (!alloced) {
+               } else {
                        lockmgr(&gp->g_glock, LK_EXCLUSIVE, NULL);
-                       error = GOP_ALLOC(vp, uio->uio_offset, uio->uio_resid,
+                       error = GOP_ALLOC(vp, uio->uio_offset, bytelen,
                            aflag, cred);
                        lockmgr(&gp->g_glock, LK_RELEASE, NULL);
                        if (error) {
-                               (void) VOP_TRUNCATE(vp, preallocoff,
-                                   ioflag & IO_SYNC, ap->a_cred,
-                                   uio->uio_procp);
                                break;
                        }
-                       alloced = TRUE;
                        ubc_alloc_flags |= UBC_FAULTBUSY;
                }
 



Home | Main Index | Thread Index | Old Index