diff options
| author | Doug Rabson <dfr@FreeBSD.org> | 1998-08-06 08:33:19 +0000 |
|---|---|---|
| committer | Doug Rabson <dfr@FreeBSD.org> | 1998-08-06 08:33:19 +0000 |
| commit | d474eaaa5fa26915fc4389a789e833f4e0159c0c (patch) | |
| tree | 1057e7f0baf3787b1e70233b0e319adc2c42862a /sys/kern | |
| parent | 757be9d291e338e5befecf11de5024a0cb07ac0e (diff) | |
Notes
Diffstat (limited to 'sys/kern')
| -rw-r--r-- | sys/kern/vfs_bio.c | 10 | ||||
| -rw-r--r-- | sys/kern/vfs_cluster.c | 8 |
2 files changed, 13 insertions, 5 deletions
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index ee0e53c36d2c..e1cb45a4b875 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -11,7 +11,7 @@ * 2. Absolutely no warranty of function or purpose is made by the author * John S. Dyson. * - * $Id: vfs_bio.c,v 1.166 1998/07/08 01:04:27 julian Exp $ + * $Id: vfs_bio.c,v 1.167 1998/07/13 07:05:55 bde Exp $ */ /* @@ -2104,7 +2104,7 @@ SYSCTL_PROC(_kern, KERN_UPDATEINTERVAL, update, CTLTYPE_INT|CTLFLAG_RW, void vfs_unbusy_pages(struct buf * bp) { - int i; + int i, s; if (bp->b_flags & B_VMIO) { struct vnode *vp = bp->b_vp; @@ -2123,7 +2123,9 @@ vfs_unbusy_pages(struct buf * bp) bp->b_pages[i] = m; pmap_qenter(trunc_page(bp->b_data), bp->b_pages, bp->b_npages); } + s = splvm(); --obj->paging_in_progress; + splx(s); m->flags &= ~PG_ZERO; PAGE_BWAKEUP(m); } @@ -2221,7 +2223,7 @@ vfs_page_set_valid(struct buf *bp, vm_ooffset_t off, int pageno, vm_page_t m) void vfs_busy_pages(struct buf * bp, int clear_modify) { - int i,s; + int i, s; if (bp->b_flags & B_VMIO) { struct vnode *vp = bp->b_vp; @@ -2248,7 +2250,9 @@ retry: m->flags &= ~PG_ZERO; if ((bp->b_flags & B_CLUSTER) == 0) { + s = splvm(); obj->paging_in_progress++; + splx(s); m->busy++; } diff --git a/sys/kern/vfs_cluster.c b/sys/kern/vfs_cluster.c index 0ab55fa85e8d..94da3f7e054e 100644 --- a/sys/kern/vfs_cluster.c +++ b/sys/kern/vfs_cluster.c @@ -33,7 +33,7 @@ * SUCH DAMAGE. * * @(#)vfs_cluster.c 8.7 (Berkeley) 2/13/94 - * $Id: vfs_cluster.c,v 1.65 1998/07/11 10:45:45 bde Exp $ + * $Id: vfs_cluster.c,v 1.66 1998/07/29 17:38:14 bde Exp $ */ #include "opt_debug_cluster.h" @@ -309,7 +309,7 @@ cluster_rbuild(vp, filesize, lbn, blkno, size, run, fbp) { struct buf *bp, *tbp; daddr_t bn; - int i, inc, j; + int i, inc, j, s; #ifdef DIAGNOSTIC if (size != vp->v_mount->mnt_stat.f_iosize) @@ -417,8 +417,10 @@ cluster_rbuild(vp, filesize, lbn, blkno, size, run, fbp) for (j = 0; j < tbp->b_npages; j += 1) { vm_page_t m; m = tbp->b_pages[j]; + s = splvm(); ++m->busy; ++m->object->paging_in_progress; + splx(s); if ((bp->b_npages == 0) || (bp->b_pages[bp->b_npages-1] != m)) { bp->b_pages[bp->b_npages] = m; @@ -782,8 +784,10 @@ cluster_wbuild(vp, size, start_lbn, len) for (j = 0; j < tbp->b_npages; j += 1) { m = tbp->b_pages[j]; + s = splvm(); ++m->busy; ++m->object->paging_in_progress; + splx(s); if ((bp->b_npages == 0) || (bp->b_pages[bp->b_npages - 1] != m)) { bp->b_pages[bp->b_npages] = m; |
