aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Cox <alc@FreeBSD.org>2002-07-31 07:27:08 +0000
committerAlan Cox <alc@FreeBSD.org>2002-07-31 07:27:08 +0000
commit67c1fae92ede8d0e9a9ea5334791e93e5b92e80d (patch)
treed49e59d08a457a2d70c935629da238b02279c1fd
parentc3a0d1d4e1ef73c5c179adb4b40be67354cc4e0d (diff)
Notes
-rw-r--r--sys/kern/vfs_cluster.c5
-rw-r--r--sys/vm/vm_page.c3
2 files changed, 6 insertions, 2 deletions
diff --git a/sys/kern/vfs_cluster.c b/sys/kern/vfs_cluster.c
index 452dfa12e0cf1..70d2e4e94921b 100644
--- a/sys/kern/vfs_cluster.c
+++ b/sys/kern/vfs_cluster.c
@@ -475,6 +475,7 @@ cluster_rbuild(vp, filesize, lbn, blkno, size, run, fbp)
BUF_KERNPROC(tbp);
TAILQ_INSERT_TAIL(&bp->b_cluster.cluster_head,
tbp, b_cluster.cluster_entry);
+ vm_page_lock_queues();
for (j = 0; j < tbp->b_npages; j += 1) {
vm_page_t m;
m = tbp->b_pages[j];
@@ -488,6 +489,7 @@ cluster_rbuild(vp, filesize, lbn, blkno, size, run, fbp)
if ((m->valid & VM_PAGE_BITS_ALL) == VM_PAGE_BITS_ALL)
tbp->b_pages[j] = bogus_page;
}
+ vm_page_unlock_queues();
/*
* XXX shouldn't this be += size for both, like in
* cluster_wbuild()?
@@ -931,7 +933,7 @@ cluster_wbuild(vp, size, start_lbn, len)
}
}
}
-
+ vm_page_lock_queues();
for (j = 0; j < tbp->b_npages; j += 1) {
m = tbp->b_pages[j];
vm_page_io_start(m);
@@ -942,6 +944,7 @@ cluster_wbuild(vp, size, start_lbn, len)
bp->b_npages++;
}
}
+ vm_page_unlock_queues();
}
bp->b_bcount += size;
bp->b_bufsize += size;
diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c
index 9acd481c2bedb..7286d1390916b 100644
--- a/sys/vm/vm_page.c
+++ b/sys/vm/vm_page.c
@@ -396,7 +396,8 @@ vm_page_wakeup(vm_page_t m)
void
vm_page_io_start(vm_page_t m)
{
- GIANT_REQUIRED;
+
+ mtx_assert(&vm_page_queue_mtx, MA_OWNED);
m->busy++;
}