Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/chs-ubc2]: src/sys/uvm fix uvn_flush() to work now that vnode offsets ar...
details: https://anonhg.NetBSD.org/src/rev/c1ed9727ac8b
branches: chs-ubc2
changeset: 471457:c1ed9727ac8b
user: chs <chs%NetBSD.org@localhost>
date: Wed Aug 11 05:40:13 1999 +0000
description:
fix uvn_flush() to work now that vnode offsets are signed.
diffstat:
sys/uvm/uvm_vnode.c | 15 ++++++++-------
1 files changed, 8 insertions(+), 7 deletions(-)
diffs (57 lines):
diff -r b0ba83bd4d16 -r c1ed9727ac8b sys/uvm/uvm_vnode.c
--- a/sys/uvm/uvm_vnode.c Wed Aug 11 05:39:16 1999 +0000
+++ b/sys/uvm/uvm_vnode.c Wed Aug 11 05:40:13 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_vnode.c,v 1.22.2.1.2.7 1999/08/09 00:05:56 chs Exp $ */
+/* $NetBSD: uvm_vnode.c,v 1.22.2.1.2.8 1999/08/11 05:40:13 chs Exp $ */
/*
* Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -500,7 +500,7 @@
struct vm_page *pps[MAXBSIZE >> PAGE_SHIFT], **ppsp;
int s;
int npages, result, lcv;
- boolean_t retval, need_iosync, by_list, needs_clean;
+ boolean_t retval, need_iosync, by_list, needs_clean, all;
voff_t curoff;
u_short pp_version;
UVMHIST_FUNC("uvn_flush"); UVMHIST_CALLED(maphist);
@@ -528,8 +528,7 @@
need_iosync = FALSE;
retval = TRUE; /* return value */
if (flags & PGO_ALLPAGES) {
- start = 0;
- stop = -1;
+ all = TRUE;
by_list = TRUE; /* always go by the list */
} else {
start = trunc_page(start);
@@ -540,6 +539,7 @@
(int)round_page(uvn->u_size));
}
+ all = FALSE;
by_list = (uobj->uo_npages <=
((stop - start) >> PAGE_SHIFT) * UVN_HASH_PENALTY);
}
@@ -565,8 +565,8 @@
for (pp = TAILQ_FIRST(&uobj->memq);
pp != NULL ;
pp = TAILQ_NEXT(pp, listq)) {
- if (pp->offset < start ||
- (pp->offset >= stop && stop != -1))
+ if (!all &&
+ (pp->offset < start || pp->offset >= stop))
continue;
pp->flags &= ~PG_CLEANCHK;
}
@@ -608,7 +608,8 @@
* range check
*/
- if (pp->offset < start || pp->offset >= stop) {
+ if (!all &&
+ (pp->offset < start || pp->offset >= stop)) {
ppnext = TAILQ_NEXT(pp, listq);
continue;
}
Home |
Main Index |
Thread Index |
Old Index