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.31 (requested by perseant):
details: https://anonhg.NetBSD.org/src/rev/b9f33f264000
branches: netbsd-1-4
changeset: 469892:b9f33f264000
user: he <he%NetBSD.org@localhost>
date: Fri Dec 17 23:55:28 1999 +0000
description:
Pull up revision 1.31 (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_vnops.c | 13 +++++++------
1 files changed, 7 insertions(+), 6 deletions(-)
diffs (44 lines):
diff -r 7d17bc7c9f3f -r b9f33f264000 sys/ufs/lfs/lfs_vnops.c
--- a/sys/ufs/lfs/lfs_vnops.c Fri Dec 17 23:55:06 1999 +0000
+++ b/sys/ufs/lfs/lfs_vnops.c Fri Dec 17 23:55:28 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lfs_vnops.c,v 1.25.2.2 1999/11/08 06:26:44 cgd Exp $ */
+/* $NetBSD: lfs_vnops.c,v 1.25.2.3 1999/12/17 23:55:28 he Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -290,20 +290,21 @@
*/
#define SET_DIROP(fs) lfs_set_dirop(fs)
static int lfs_set_dirop __P((struct lfs *));
+extern int lfs_dirvcount;
static int lfs_set_dirop(fs)
struct lfs *fs;
{
int error;
- while (fs->lfs_writer || fs->lfs_dirvcount>LFS_MAXDIROP) {
+ while (fs->lfs_writer || lfs_dirvcount>LFS_MAXDIROP) {
if(fs->lfs_writer)
tsleep(&fs->lfs_dirops, PRIBIO + 1, "lfs_dirop", 0);
- if(fs->lfs_dirvcount > LFS_MAXDIROP) {
+ if(lfs_dirvcount > LFS_MAXDIROP) {
#ifdef DEBUG_LFS
- printf("(dirvcount=%d)\n",fs->lfs_dirvcount);
+ printf("(dirvcount=%d)\n",lfs_dirvcount);
#endif
- if((error=tsleep(&fs->lfs_dirvcount, PCATCH|PUSER, "lfs_maxdirop", 0))!=0)
+ if((error=tsleep(&lfs_dirvcount, PCATCH|PUSER, "lfs_maxdirop", 0))!=0)
return error;
}
}
@@ -324,7 +325,7 @@
#define MARK_VNODE(dvp) do { \
if(!((dvp)->v_flag & VDIROP)) { \
lfs_vref(dvp); \
- ++VTOI((dvp))->i_lfs->lfs_dirvcount; \
+ ++lfs_dirvcount; \
} \
(dvp)->v_flag |= VDIROP; \
} while(0)
Home |
Main Index |
Thread Index |
Old Index