Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys - In genfs_putpages(), no need to restrict the cluster w...
details: https://anonhg.NetBSD.org/src/rev/b32f5f151c8b
branches: trunk
changeset: 526717:b32f5f151c8b
user: enami <enami%NetBSD.org@localhost>
date: Thu May 09 07:14:37 2002 +0000
description:
- In genfs_putpages(), no need to restrict the cluster within the given
region.
- In uvm_aio_aiodone(), remove assertions no longer true.
diffstat:
sys/miscfs/genfs/genfs_vnops.c | 8 +++++---
sys/uvm/uvm_pager.c | 9 +++------
2 files changed, 8 insertions(+), 9 deletions(-)
diffs (87 lines):
diff -r 9901713fd085 -r b32f5f151c8b sys/miscfs/genfs/genfs_vnops.c
--- a/sys/miscfs/genfs/genfs_vnops.c Thu May 09 07:04:23 2002 +0000
+++ b/sys/miscfs/genfs/genfs_vnops.c Thu May 09 07:14:37 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: genfs_vnops.c,v 1.57 2002/05/06 00:42:22 enami Exp $ */
+/* $NetBSD: genfs_vnops.c,v 1.58 2002/05/09 07:14:37 enami Exp $ */
/*
* Copyright (c) 1982, 1986, 1989, 1993
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: genfs_vnops.c,v 1.57 2002/05/06 00:42:22 enami Exp $");
+__KERNEL_RCSID(0, "$NetBSD: genfs_vnops.c,v 1.58 2002/05/09 07:14:37 enami Exp $");
#include "opt_nfsserver.h"
@@ -1177,7 +1177,7 @@
* the array of pages.
*/
- npages = MIN(n, (endoff - off) >> PAGE_SHIFT) - 1;
+ npages = n - 1;
uvn_findpages(uobj, off + PAGE_SIZE, &npages,
&pgs[nback + 1],
UFP_NOWAIT|UFP_NOALLOC|UFP_DIRTYONLY);
@@ -1197,6 +1197,8 @@
for (i = 0; i < npages; i++) {
tpg = pgs[i];
KASSERT(tpg->uobject == uobj);
+ if (tpg->offset < startoff || tpg->offset >= endoff)
+ continue;
if (flags & PGO_DEACTIVATE &&
(tpg->pqflags & PQ_INACTIVE) == 0 &&
tpg->wire_count == 0) {
diff -r 9901713fd085 -r b32f5f151c8b sys/uvm/uvm_pager.c
--- a/sys/uvm/uvm_pager.c Thu May 09 07:04:23 2002 +0000
+++ b/sys/uvm/uvm_pager.c Thu May 09 07:14:37 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_pager.c,v 1.55 2001/12/31 19:21:38 chs Exp $ */
+/* $NetBSD: uvm_pager.c,v 1.56 2002/05/09 07:14:38 enami Exp $ */
/*
*
@@ -39,7 +39,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_pager.c,v 1.55 2001/12/31 19:21:38 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_pager.c,v 1.56 2002/05/09 07:14:38 enami Exp $");
#include "opt_uvmhist.h"
@@ -299,7 +299,7 @@
struct uvm_object *uobj;
struct simplelock *slock;
int s, i, error, swslot;
- boolean_t write, swap, pageout;
+ boolean_t write, swap;
UVMHIST_FUNC("uvm_aio_aiodone"); UVMHIST_CALLED(ubchist);
UVMHIST_LOG(ubchist, "bp %p", bp, 0,0,0);
@@ -322,7 +322,6 @@
pg = pgs[0];
swap = (pg->uanon != NULL && pg->uobject == NULL) ||
(pg->pqflags & PQ_AOBJ) != 0;
- pageout = (pg->flags & PG_PAGEOUT) != 0;
if (!swap) {
uobj = pg->uobject;
slock = &uobj->vmobjlock;
@@ -339,7 +338,6 @@
for (i = 0; i < npages; i++) {
pg = pgs[i];
KASSERT(swap || pg->uobject == uobj);
- KASSERT(pageout ^ ((pg->flags & PG_PAGEOUT) == 0));
UVMHIST_LOG(ubchist, "pg %p", pg, 0,0,0);
/*
@@ -421,7 +419,6 @@
simple_unlock(slock);
} else {
KASSERT(write);
- KASSERT(pageout);
/* these pages are now only in swap. */
simple_lock(&uvm.swap_data_lock);
Home |
Main Index |
Thread Index |
Old Index