diff options
author | luoqi <luoqi@FreeBSD.org> | 1998-10-07 13:59:26 +0000 |
---|---|---|
committer | luoqi <luoqi@FreeBSD.org> | 1998-10-07 13:59:26 +0000 |
commit | b09f25123dfc8fe9dc5690dd3b046031c1c6f7a7 (patch) | |
tree | 24d1ae142083d517d72b92fe1566dea55a3f6b21 /sys/ufs | |
parent | 0d6146b8ef0fcb24eb0df404564ba9bae85d07d0 (diff) | |
download | FreeBSD-src-b09f25123dfc8fe9dc5690dd3b046031c1c6f7a7.zip FreeBSD-src-b09f25123dfc8fe9dc5690dd3b046031c1c6f7a7.tar.gz |
Use vm_page_xxx() inline functions to manipulate vm_page::flags, vm_page::busy.
As a side effect, a few wakeup() calls are added, which might fix some of the
missing vm_page wakeups people have been seeing.
Reviewed by: Doug Rabson <dfr@nlsystems.com>
Diffstat (limited to 'sys/ufs')
-rw-r--r-- | sys/ufs/ufs/ufs_readwrite.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/ufs/ufs/ufs_readwrite.c b/sys/ufs/ufs/ufs_readwrite.c index 265ba66..2f5b7f3 100644 --- a/sys/ufs/ufs/ufs_readwrite.c +++ b/sys/ufs/ufs/ufs_readwrite.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)ufs_readwrite.c 8.11 (Berkeley) 5/8/95 - * $Id: ufs_readwrite.c,v 1.51 1998/07/08 01:04:33 julian Exp $ + * $Id: ufs_readwrite.c,v 1.52 1998/09/07 11:50:19 bde Exp $ */ #define BLKSIZE(a, b, c) blksize(a, b, c) @@ -473,8 +473,8 @@ ffs_getpages(ap) for (i = 0; i < pcount; i++) { m = ap->a_m[i]; vm_page_activate(m); - m->busy++; - m->flags &= ~PG_BUSY; + vm_page_io_start(m); + vm_page_wakeup(m); } auio.uio_iov = &aiov; @@ -491,18 +491,18 @@ ffs_getpages(ap) for (i = 0; i < pcount; i++) { m = ap->a_m[i]; - m->busy--; + vm_page_io_finish(m); if ((m != mreq) && (m->wire_count == 0) && (m->hold_count == 0) && (m->valid == 0) && (m->busy == 0) && (m->flags & PG_BUSY) == 0) { - m->flags |= PG_BUSY; + vm_page_busy(m); vm_page_free(m); } else if (m == mreq) { while (m->flags & PG_BUSY) { vm_page_sleep(m, "ffspwt", NULL); } - m->flags |= PG_BUSY; + vm_page_busy(m); vp->v_lastr = m->pindex + 1; } else { if (m->wire_count == 0) { |