Source-Changes-HG archive

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

[src/netbsd-1-4]: src/sys/ufs/lfs Pull up revision 1.41 (requested by perseant):



details:   https://anonhg.NetBSD.org/src/rev/7d17bc7c9f3f
branches:  netbsd-1-4
changeset: 469891:7d17bc7c9f3f
user:      he <he%NetBSD.org@localhost>
date:      Fri Dec 17 23:55:06 1999 +0000

description:
Pull up revision 1.41 (requested by perseant):
  Address locking protocol error for inode hash, and make the
  maximum number of active dirops a global quantity.

diffstat:

 sys/ufs/lfs/lfs_vfsops.c |  15 +--------------
 1 files changed, 1 insertions(+), 14 deletions(-)

diffs (72 lines):

diff -r 67bd543a9db0 -r 7d17bc7c9f3f sys/ufs/lfs/lfs_vfsops.c
--- a/sys/ufs/lfs/lfs_vfsops.c  Fri Dec 17 23:54:40 1999 +0000
+++ b/sys/ufs/lfs/lfs_vfsops.c  Fri Dec 17 23:55:06 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: lfs_vfsops.c,v 1.28.2.3 1999/12/17 23:23:19 he Exp $   */
+/*     $NetBSD: lfs_vfsops.c,v 1.28.2.4 1999/12/17 23:55:06 he Exp $   */
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -393,7 +393,6 @@
 
        /* Set up the I/O information */
        fs->lfs_iocount = 0;
-       fs->lfs_dirvcount = 0;
        fs->lfs_diropwait = 0;
        fs->lfs_activesb = 0;
 #ifdef LFS_CANNOT_ROLLFW
@@ -617,9 +616,7 @@
        return (error);
 }
 
-#ifdef USE_UFS_HASHLOCK
 extern struct lock ufs_hashlock;
-#endif
 
 /*
  * Look up an LFS dinode number to find its incore vnode.  If not already
@@ -648,14 +645,10 @@
        ump = VFSTOUFS(mp);
        dev = ump->um_dev;
 
-#ifdef USE_UFS_HASHLOCK
        do {
-#endif
                if ((*vpp = ufs_ihashget(dev, ino)) != NULL)
                        return (0);
-#ifdef USE_UFS_HASHLOCK
        } while (lockmgr(&ufs_hashlock, LK_EXCLUSIVE|LK_SLEEPFAIL, 0));
-#endif
 
        /* Translate the inode number to a disk address. */
        fs = ump->um_lfs;
@@ -669,9 +662,7 @@
 #endif
                brelse(bp);
                if (daddr == LFS_UNUSED_DADDR) {
-#ifdef USE_UFS_HASHLOCK
                        lockmgr(&ufs_hashlock, LK_RELEASE, 0);
-#endif
                        return (ENOENT);
                }
        }
@@ -679,9 +670,7 @@
        /* Allocate new vnode/inode. */
        if ((error = lfs_vcreate(mp, ino, &vp)) != 0) {
                *vpp = NULL;
-#ifdef USE_UFS_HASHLOCK
                lockmgr(&ufs_hashlock, LK_RELEASE, 0);
-#endif
                return (error);
        }
 
@@ -693,9 +682,7 @@
         */
        ip = VTOI(vp);
        ufs_ihashins(ip);
-#ifdef USE_UFS_HASHLOCK
        lockmgr(&ufs_hashlock, LK_RELEASE, 0);
-#endif
 
        /*
         * XXX



Home | Main Index | Thread Index | Old Index