summaryrefslogtreecommitdiff
path: root/sys/uvm/uvm_vnode.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/uvm/uvm_vnode.c')
-rw-r--r--sys/uvm/uvm_vnode.c64
1 files changed, 32 insertions, 32 deletions
diff --git a/sys/uvm/uvm_vnode.c b/sys/uvm/uvm_vnode.c
index 73131993ebd..6a8c17d7bfc 100644
--- a/sys/uvm/uvm_vnode.c
+++ b/sys/uvm/uvm_vnode.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_vnode.c,v 1.44 2007/03/25 13:14:41 pedro Exp $ */
+/* $OpenBSD: uvm_vnode.c,v 1.45 2007/04/04 17:44:45 art Exp $ */
/* $NetBSD: uvm_vnode.c,v 1.36 2000/11/24 20:34:01 chs Exp $ */
/*
@@ -592,7 +592,7 @@ uvm_vnp_terminate(vp)
#ifdef DEBUG
struct vm_page *pp;
TAILQ_FOREACH(pp, &uvn->u_obj.memq, listq) {
- if ((pp->flags & PG_BUSY) == 0)
+ if ((pp->pg_flags & PG_BUSY) == 0)
panic("uvm_vnp_terminate: detected unbusy pg");
}
if (uvn->u_nio == 0)
@@ -676,7 +676,7 @@ uvn_releasepg(pg, nextpgp)
{
struct uvm_vnode *uvn = (struct uvm_vnode *) pg->uobject;
#ifdef DIAGNOSTIC
- if ((pg->flags & PG_RELEASED) == 0)
+ if ((pg->pg_flags & PG_RELEASED) == 0)
panic("uvn_releasepg: page not released!");
#endif
@@ -873,7 +873,7 @@ uvn_flush(uobj, start, stop, flags)
if (!all &&
(pp->offset < start || pp->offset >= stop))
continue;
- pp->flags &= ~PG_CLEANCHK;
+ pp->pg_flags &= ~PG_CLEANCHK;
}
} else { /* by hash */
@@ -881,7 +881,7 @@ uvn_flush(uobj, start, stop, flags)
curoff += PAGE_SIZE) {
pp = uvm_pagelookup(uobj, curoff);
if (pp)
- pp->flags &= ~PG_CLEANCHK;
+ pp->pg_flags &= ~PG_CLEANCHK;
}
}
}
@@ -945,9 +945,9 @@ uvn_flush(uobj, start, stop, flags)
* confuse pagedaemon).
*/
- if ((flags & PGO_CLEANIT) == 0 || (pp->flags & PG_BUSY) != 0) {
+ if ((flags & PGO_CLEANIT) == 0 || (pp->pg_flags & PG_BUSY) != 0) {
needs_clean = FALSE;
- if ((pp->flags & PG_BUSY) != 0 &&
+ if ((pp->pg_flags & PG_BUSY) != 0 &&
(flags & (PGO_CLEANIT|PGO_SYNCIO)) ==
(PGO_CLEANIT|PGO_SYNCIO))
need_iosync = TRUE;
@@ -956,16 +956,16 @@ uvn_flush(uobj, start, stop, flags)
* freeing: nuke all mappings so we can sync
* PG_CLEAN bit with no race
*/
- if ((pp->flags & PG_CLEAN) != 0 &&
+ if ((pp->pg_flags & PG_CLEAN) != 0 &&
(flags & PGO_FREE) != 0 &&
(pp->pqflags & PQ_ACTIVE) != 0)
pmap_page_protect(pp, VM_PROT_NONE);
- if ((pp->flags & PG_CLEAN) != 0 &&
+ if ((pp->pg_flags & PG_CLEAN) != 0 &&
pmap_is_modified(pp))
- pp->flags &= ~(PG_CLEAN);
- pp->flags |= PG_CLEANCHK; /* update "hint" */
+ pp->pg_flags &= ~(PG_CLEAN);
+ pp->pg_flags |= PG_CLEANCHK; /* update "hint" */
- needs_clean = ((pp->flags & PG_CLEAN) == 0);
+ needs_clean = ((pp->pg_flags & PG_CLEAN) == 0);
}
/*
@@ -989,9 +989,9 @@ uvn_flush(uobj, start, stop, flags)
}
} else if (flags & PGO_FREE) {
- if (pp->flags & PG_BUSY) {
+ if (pp->pg_flags & PG_BUSY) {
/* release busy pages */
- pp->flags |= PG_RELEASED;
+ pp->pg_flags |= PG_RELEASED;
} else {
pmap_page_protect(pp, VM_PROT_NONE);
/* removed page from object */
@@ -1011,10 +1011,10 @@ uvn_flush(uobj, start, stop, flags)
* note: locked: uobj and page queues.
*/
- pp->flags |= PG_BUSY; /* we 'own' page now */
+ pp->pg_flags |= PG_BUSY; /* we 'own' page now */
UVM_PAGE_OWN(pp, "uvn_flush");
pmap_page_protect(pp, VM_PROT_READ);
- pp_version = pp->version;
+ pp_version = pp->pg_version;
ReTry:
ppsp = pps;
npages = sizeof(pps) / sizeof(struct vm_page *);
@@ -1078,7 +1078,7 @@ ReTry:
* no per-page ops: refresh ppnext and continue
*/
if (by_list) {
- if (pp->version == pp_version)
+ if (pp->pg_version == pp_version)
ppnext = TAILQ_NEXT(pp, listq);
else
/* reset */
@@ -1117,7 +1117,7 @@ ReTry:
/* set up next page for outer loop */
if (by_list) {
- if (pp->version == pp_version)
+ if (pp->pg_version == pp_version)
ppnext = TAILQ_NEXT(pp, listq);
else
/* reset */
@@ -1143,13 +1143,13 @@ ReTry:
*/
if (result != VM_PAGER_PEND) {
- if (ptmp->flags & PG_WANTED)
+ if (ptmp->pg_flags & PG_WANTED)
/* still holding object lock */
wakeup(ptmp);
- ptmp->flags &= ~(PG_WANTED|PG_BUSY);
+ ptmp->pg_flags &= ~(PG_WANTED|PG_BUSY);
UVM_PAGE_OWN(ptmp, NULL);
- if (ptmp->flags & PG_RELEASED) {
+ if (ptmp->pg_flags & PG_RELEASED) {
/* pgo_releasepg wants this */
uvm_unlock_pageq();
@@ -1160,7 +1160,7 @@ ReTry:
continue; /* next page */
} else {
- ptmp->flags |= (PG_CLEAN|PG_CLEANCHK);
+ ptmp->pg_flags |= (PG_CLEAN|PG_CLEANCHK);
if ((flags & PGO_FREE) == 0)
pmap_clear_modify(ptmp);
}
@@ -1179,9 +1179,9 @@ ReTry:
} else if (flags & PGO_FREE) {
if (result == VM_PAGER_PEND) {
- if ((ptmp->flags & PG_BUSY) != 0)
+ if ((ptmp->pg_flags & PG_BUSY) != 0)
/* signal for i/o done */
- ptmp->flags |= PG_RELEASED;
+ ptmp->pg_flags |= PG_RELEASED;
} else {
if (result != VM_PAGER_OK) {
printf("uvn_flush: obj=%p, "
@@ -1349,7 +1349,7 @@ uvn_get(uobj, offset, pps, npagesp, centeridx, access_type, advice, flags)
/* to be useful must get a non-busy, non-released pg */
if (ptmp == NULL ||
- (ptmp->flags & (PG_BUSY|PG_RELEASED)) != 0) {
+ (ptmp->pg_flags & (PG_BUSY|PG_RELEASED)) != 0) {
if (lcv == centeridx || (flags & PGO_ALLPAGES)
!= 0)
done = FALSE; /* need to do a wait or I/O! */
@@ -1360,7 +1360,7 @@ uvn_get(uobj, offset, pps, npagesp, centeridx, access_type, advice, flags)
* useful page: busy/lock it and plug it in our
* result array
*/
- ptmp->flags |= PG_BUSY; /* loan up to caller */
+ ptmp->pg_flags |= PG_BUSY; /* loan up to caller */
UVM_PAGE_OWN(ptmp, "uvn_get1");
pps[lcv] = ptmp;
gotpages++;
@@ -1455,8 +1455,8 @@ uvn_get(uobj, offset, pps, npagesp, centeridx, access_type, advice, flags)
}
/* page is there, see if we need to wait on it */
- if ((ptmp->flags & (PG_BUSY|PG_RELEASED)) != 0) {
- ptmp->flags |= PG_WANTED;
+ if ((ptmp->pg_flags & (PG_BUSY|PG_RELEASED)) != 0) {
+ ptmp->pg_flags |= PG_WANTED;
UVM_UNLOCK_AND_WAIT(ptmp,
&uobj->vmobjlock, FALSE, "uvn_get",0);
simple_lock(&uobj->vmobjlock);
@@ -1469,7 +1469,7 @@ uvn_get(uobj, offset, pps, npagesp, centeridx, access_type, advice, flags)
* now (so we own it) and set pps[lcv] (so that we
* exit the while loop).
*/
- ptmp->flags |= PG_BUSY;
+ ptmp->pg_flags |= PG_BUSY;
UVM_PAGE_OWN(ptmp, "uvn_get2");
pps[lcv] = ptmp;
}
@@ -1501,11 +1501,11 @@ uvn_get(uobj, offset, pps, npagesp, centeridx, access_type, advice, flags)
/* lock object. check for errors. */
simple_lock(&uobj->vmobjlock);
if (result != VM_PAGER_OK) {
- if (ptmp->flags & PG_WANTED)
+ if (ptmp->pg_flags & PG_WANTED)
/* object lock still held */
wakeup(ptmp);
- ptmp->flags &= ~(PG_WANTED|PG_BUSY);
+ ptmp->pg_flags &= ~(PG_WANTED|PG_BUSY);
UVM_PAGE_OWN(ptmp, NULL);
uvm_lock_pageq();
uvm_pagefree(ptmp);
@@ -1525,7 +1525,7 @@ uvn_get(uobj, offset, pps, npagesp, centeridx, access_type, advice, flags)
* => activate the page
*/
- ptmp->flags &= ~PG_FAKE; /* data is valid ... */
+ ptmp->pg_flags &= ~PG_FAKE; /* data is valid ... */
pmap_clear_modify(ptmp); /* ... and clean */
pps[lcv] = ptmp;