summaryrefslogtreecommitdiff
path: root/sys/ufs/ffs
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2008-06-12 06:58:41 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2008-06-12 06:58:41 +0000
commit750260e3bf10f2e3e7853d979f57c79e3d35d6f8 (patch)
tree3e5546efc1642a2474331d40a68a26f1d607aba0 /sys/ufs/ffs
parent11ae183db4029474658e0aedf2d6e5ec178c148e (diff)
Bring biomem diff back into the tree after the nfs_bio.c fix went in.
ok thib beck art
Diffstat (limited to 'sys/ufs/ffs')
-rw-r--r--sys/ufs/ffs/ffs_inode.c4
-rw-r--r--sys/ufs/ffs/ffs_softdep.c8
-rw-r--r--sys/ufs/ffs/ffs_vnops.c5
3 files changed, 10 insertions, 7 deletions
diff --git a/sys/ufs/ffs/ffs_inode.c b/sys/ufs/ffs/ffs_inode.c
index 99594c39f93..8500cb8d2f0 100644
--- a/sys/ufs/ffs/ffs_inode.c
+++ b/sys/ufs/ffs/ffs_inode.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ffs_inode.c,v 1.54 2008/06/11 12:35:46 deraadt Exp $ */
+/* $OpenBSD: ffs_inode.c,v 1.55 2008/06/12 06:58:40 deraadt Exp $ */
/* $NetBSD: ffs_inode.c,v 1.10 1996/05/11 18:27:19 mycroft Exp $ */
/*
@@ -501,6 +501,8 @@ ffs_indirtrunc(struct inode *ip, daddr64_t lbn, daddr64_t dbn,
bp = getblk(vp, lbn, (int)fs->fs_bsize, 0, 0);
if (!(bp->b_flags & (B_DONE | B_DELWRI))) {
curproc->p_stats->p_ru.ru_inblock++; /* pay for read */
+ bcstats.pendingreads++;
+ bcstats.numreads++;
bp->b_flags |= B_READ;
if (bp->b_bcount > bp->b_bufsize)
panic("ffs_indirtrunc: bad buffer size");
diff --git a/sys/ufs/ffs/ffs_softdep.c b/sys/ufs/ffs/ffs_softdep.c
index e6fe34b1559..b7ef8b81994 100644
--- a/sys/ufs/ffs/ffs_softdep.c
+++ b/sys/ufs/ffs/ffs_softdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ffs_softdep.c,v 1.96 2008/06/11 12:35:46 deraadt Exp $ */
+/* $OpenBSD: ffs_softdep.c,v 1.97 2008/06/12 06:58:40 deraadt Exp $ */
/*
* Copyright 1998, 2000 Marshall Kirk McKusick. All Rights Reserved.
@@ -4691,9 +4691,9 @@ softdep_fsync_mountdev(vp, waitfor)
/*
* If it is already scheduled, skip to the next buffer.
*/
+ splassert(IPL_BIO);
if (bp->b_flags & B_BUSY)
continue;
- bp->b_flags |= B_BUSY;
if ((bp->b_flags & B_DELWRI) == 0) {
FREE_LOCK(&lk);
@@ -4705,10 +4705,10 @@ softdep_fsync_mountdev(vp, waitfor)
*/
if ((wk = LIST_FIRST(&bp->b_dep)) == NULL ||
wk->wk_type != D_BMSAFEMAP) {
- bp->b_flags &= ~B_BUSY;
continue;
}
bremfree(bp);
+ buf_acquire(bp);
FREE_LOCK(&lk);
(void) bawrite(bp);
ACQUIRE_LOCK(&lk);
@@ -5616,7 +5616,7 @@ getdirtybuf(bp, waitfor)
if ((bp->b_flags & B_DELWRI) == 0)
return (0);
bremfree(bp);
- bp->b_flags |= B_BUSY;
+ buf_acquire(bp);
return (1);
}
diff --git a/sys/ufs/ffs/ffs_vnops.c b/sys/ufs/ffs/ffs_vnops.c
index e03549518ab..12b1e2c3552 100644
--- a/sys/ufs/ffs/ffs_vnops.c
+++ b/sys/ufs/ffs/ffs_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ffs_vnops.c,v 1.50 2008/06/11 12:35:46 deraadt Exp $ */
+/* $OpenBSD: ffs_vnops.c,v 1.51 2008/06/12 06:58:40 deraadt Exp $ */
/* $NetBSD: ffs_vnops.c,v 1.7 1996/05/11 18:27:24 mycroft Exp $ */
/*
@@ -449,7 +449,8 @@ loop:
}
bremfree(bp);
- bp->b_flags |= B_BUSY | B_SCANNED;
+ buf_acquire(bp);
+ bp->b_flags |= B_SCANNED;
splx(s);
/*
* On our final pass through, do all I/O synchronously