vm_pager_put_pages() is passed an rcval array to hold per-page return
values. The 'int' return value for the procedure was never used and not well defined in any case when there are mixed errors on pages, so it has been removed. vm_pager_put_pages() and associated vm_pager functions now return void.
This commit is contained in:
parent
e1a4feafd0
commit
e4542174b0
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=43129
@ -36,7 +36,7 @@
|
||||
* physically freed after having been cleaned and even then vm_page->swapblk
|
||||
* is maintained whenever a resident page also has swap backing store.
|
||||
*
|
||||
* $Id: default_pager.c,v 1.17 1999/01/21 08:29:09 dillon Exp $
|
||||
* $Id: default_pager.c,v 1.18 1999/01/21 09:33:06 dillon Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -56,7 +56,7 @@ static vm_object_t default_pager_alloc __P((void *, vm_ooffset_t, vm_prot_t,
|
||||
vm_ooffset_t));
|
||||
static void default_pager_dealloc __P((vm_object_t));
|
||||
static int default_pager_getpages __P((vm_object_t, vm_page_t *, int, int));
|
||||
static int default_pager_putpages __P((vm_object_t, vm_page_t *, int,
|
||||
static void default_pager_putpages __P((vm_object_t, vm_page_t *, int,
|
||||
boolean_t, int *));
|
||||
static boolean_t default_pager_haspage __P((vm_object_t, vm_pindex_t, int *,
|
||||
int *));
|
||||
@ -126,7 +126,7 @@ default_pager_getpages(object, m, count, reqpage)
|
||||
* cache to the free list.
|
||||
*/
|
||||
|
||||
static int
|
||||
static void
|
||||
default_pager_putpages(object, m, c, sync, rtvals)
|
||||
vm_object_t object;
|
||||
vm_page_t *m;
|
||||
@ -134,7 +134,7 @@ default_pager_putpages(object, m, c, sync, rtvals)
|
||||
boolean_t sync;
|
||||
int *rtvals;
|
||||
{
|
||||
return swap_pager_putpages(object, m, c, sync, rtvals);
|
||||
swap_pager_putpages(object, m, c, sync, rtvals);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -36,7 +36,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)device_pager.c 8.1 (Berkeley) 6/11/93
|
||||
* $Id: device_pager.c,v 1.37 1999/01/08 17:31:23 eivind Exp $
|
||||
* $Id: device_pager.c,v 1.38 1999/01/21 08:29:09 dillon Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -57,7 +57,7 @@ static vm_object_t dev_pager_alloc __P((void *, vm_ooffset_t, vm_prot_t,
|
||||
vm_ooffset_t));
|
||||
static void dev_pager_dealloc __P((vm_object_t));
|
||||
static int dev_pager_getpages __P((vm_object_t, vm_page_t *, int, int));
|
||||
static int dev_pager_putpages __P((vm_object_t, vm_page_t *, int,
|
||||
static void dev_pager_putpages __P((vm_object_t, vm_page_t *, int,
|
||||
boolean_t, int *));
|
||||
static boolean_t dev_pager_haspage __P((vm_object_t, vm_pindex_t, int *,
|
||||
int *));
|
||||
@ -225,7 +225,7 @@ dev_pager_getpages(object, m, count, reqpage)
|
||||
return (VM_PAGER_OK);
|
||||
}
|
||||
|
||||
static int
|
||||
static void
|
||||
dev_pager_putpages(object, m, count, sync, rtvals)
|
||||
vm_object_t object;
|
||||
vm_page_t *m;
|
||||
|
@ -64,7 +64,7 @@
|
||||
*
|
||||
* @(#)swap_pager.c 8.9 (Berkeley) 3/21/94
|
||||
*
|
||||
* $Id: swap_pager.c,v 1.108 1999/01/21 08:29:09 dillon Exp $
|
||||
* $Id: swap_pager.c,v 1.109 1999/01/21 09:33:07 dillon Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -974,7 +974,7 @@ swap_pager_getpages(object, m, count, reqpage)
|
||||
* We need to unbusy the rest on I/O completion.
|
||||
*/
|
||||
|
||||
int
|
||||
void
|
||||
swap_pager_putpages(object, m, count, sync, rtvals)
|
||||
vm_object_t object;
|
||||
vm_page_t *m;
|
||||
@ -984,7 +984,6 @@ swap_pager_putpages(object, m, count, sync, rtvals)
|
||||
{
|
||||
int i;
|
||||
int n = 0;
|
||||
int grv = VM_PAGER_OK;
|
||||
|
||||
#if !defined(MAX_PERF)
|
||||
if (count && m[0]->object != object) {
|
||||
@ -1046,7 +1045,6 @@ swap_pager_putpages(object, m, count, sync, rtvals)
|
||||
for (j = 0; j < n; ++j) {
|
||||
rtvals[i+j] = VM_PAGER_FAIL;
|
||||
}
|
||||
grv = VM_PAGER_FAIL;
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -1129,7 +1127,6 @@ swap_pager_putpages(object, m, count, sync, rtvals)
|
||||
rtvals[i+j] = VM_PAGER_PEND;
|
||||
|
||||
splx(s);
|
||||
grv = VM_PAGER_PEND;
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -1152,16 +1149,20 @@ swap_pager_putpages(object, m, count, sync, rtvals)
|
||||
tsleep(bp, PVM, "swwrt", 0);
|
||||
}
|
||||
|
||||
#if 0
|
||||
if (bp->b_flags & B_ERROR) {
|
||||
grv = VM_PAGER_ERROR;
|
||||
}
|
||||
#endif
|
||||
|
||||
for (j = 0; j < n; ++j)
|
||||
rtvals[i+j] = VM_PAGER_PEND;
|
||||
|
||||
#if 0
|
||||
if (bp->b_flags & B_ERROR) {
|
||||
grv = VM_PAGER_ERROR;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Now that we are through with the bp, we can call the
|
||||
@ -1172,8 +1173,6 @@ swap_pager_putpages(object, m, count, sync, rtvals)
|
||||
|
||||
splx(s);
|
||||
}
|
||||
|
||||
return(grv);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -36,7 +36,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)swap_pager.h 7.1 (Berkeley) 12/5/90
|
||||
* $Id: swap_pager.h,v 1.22 1998/07/10 21:50:17 alex Exp $
|
||||
* $Id: swap_pager.h,v 1.23 1999/01/21 08:29:10 dillon Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -88,7 +88,7 @@ extern struct pagerlst swap_pager_un_object_list;
|
||||
extern int swap_pager_full;
|
||||
extern struct blist *swapblist;
|
||||
|
||||
int swap_pager_putpages __P((vm_object_t, vm_page_t *, int, boolean_t, int *));
|
||||
void swap_pager_putpages __P((vm_object_t, vm_page_t *, int, boolean_t, int *));
|
||||
boolean_t swap_pager_haspage __P((vm_object_t object, vm_pindex_t pindex, int *before, int *after));
|
||||
|
||||
int swap_pager_swp_alloc __P((vm_object_t, int));
|
||||
|
@ -61,7 +61,7 @@
|
||||
* any improvements or extensions that they make and grant Carnegie the
|
||||
* rights to redistribute these changes.
|
||||
*
|
||||
* $Id: vm_pager.c,v 1.41 1999/01/21 08:29:12 dillon Exp $
|
||||
* $Id: vm_pager.c,v 1.42 1999/01/21 10:15:24 dillon Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -96,11 +96,11 @@ int cluster_pbuf_freecnt = -1; /* unlimited to begin with */
|
||||
static int dead_pager_getpages __P((vm_object_t, vm_page_t *, int, int));
|
||||
static vm_object_t dead_pager_alloc __P((void *, vm_ooffset_t, vm_prot_t,
|
||||
vm_ooffset_t));
|
||||
static int dead_pager_putpages __P((vm_object_t, vm_page_t *, int, int, int *));
|
||||
static void dead_pager_putpages __P((vm_object_t, vm_page_t *, int, int, int *));
|
||||
static boolean_t dead_pager_haspage __P((vm_object_t, vm_pindex_t, int *, int *));
|
||||
static void dead_pager_dealloc __P((vm_object_t));
|
||||
|
||||
int
|
||||
static int
|
||||
dead_pager_getpages(obj, ma, count, req)
|
||||
vm_object_t obj;
|
||||
vm_page_t *ma;
|
||||
@ -110,7 +110,7 @@ dead_pager_getpages(obj, ma, count, req)
|
||||
return VM_PAGER_FAIL;
|
||||
}
|
||||
|
||||
vm_object_t
|
||||
static vm_object_t
|
||||
dead_pager_alloc(handle, size, prot, off)
|
||||
void *handle;
|
||||
vm_ooffset_t size;
|
||||
@ -120,7 +120,7 @@ dead_pager_alloc(handle, size, prot, off)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int
|
||||
static void
|
||||
dead_pager_putpages(object, m, count, flags, rtvals)
|
||||
vm_object_t object;
|
||||
vm_page_t *m;
|
||||
@ -129,13 +129,13 @@ dead_pager_putpages(object, m, count, flags, rtvals)
|
||||
int *rtvals;
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < count; i++) {
|
||||
rtvals[i] = VM_PAGER_AGAIN;
|
||||
}
|
||||
return VM_PAGER_AGAIN;
|
||||
}
|
||||
|
||||
int
|
||||
static int
|
||||
dead_pager_haspage(object, pindex, prev, next)
|
||||
vm_object_t object;
|
||||
vm_pindex_t pindex;
|
||||
@ -149,7 +149,7 @@ dead_pager_haspage(object, pindex, prev, next)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
dead_pager_dealloc(object)
|
||||
vm_object_t object;
|
||||
{
|
||||
|
@ -36,7 +36,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)vm_pager.h 8.4 (Berkeley) 1/12/94
|
||||
* $Id: vm_pager.h,v 1.18 1999/01/21 08:29:12 dillon Exp $
|
||||
* $Id: vm_pager.h,v 1.19 1999/01/21 10:15:47 dillon Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -55,7 +55,7 @@ struct pagerops {
|
||||
vm_object_t (*pgo_alloc) __P((void *, vm_ooffset_t, vm_prot_t, vm_ooffset_t)); /* Allocate pager. */
|
||||
void (*pgo_dealloc) __P((vm_object_t)); /* Disassociate. */
|
||||
int (*pgo_getpages) __P((vm_object_t, vm_page_t *, int, int)); /* Get (read) page. */
|
||||
int (*pgo_putpages) __P((vm_object_t, vm_page_t *, int, int, int *)); /* Put (write) page. */
|
||||
void (*pgo_putpages) __P((vm_object_t, vm_page_t *, int, int, int *)); /* Put (write) page. */
|
||||
boolean_t (*pgo_haspage) __P((vm_object_t, vm_pindex_t, int *, int *)); /* Does pager have page? */
|
||||
void (*pgo_pageunswapped) __P((vm_page_t));
|
||||
};
|
||||
@ -98,7 +98,6 @@ void vm_pager_init __P((void));
|
||||
vm_object_t vm_pager_object_lookup __P((struct pagerlst *, void *));
|
||||
vm_offset_t vm_pager_map_pages __P((vm_page_t *, int, boolean_t));
|
||||
vm_offset_t vm_pager_map_page __P((vm_page_t));
|
||||
static __inline int vm_pager_put_pages __P((vm_object_t, vm_page_t *, int, boolean_t, int *));
|
||||
void vm_pager_sync __P((void));
|
||||
void vm_pager_unmap_pages __P((vm_offset_t, int));
|
||||
void vm_pager_unmap_page __P((vm_offset_t));
|
||||
@ -113,7 +112,7 @@ vm_pager_get_pages(
|
||||
return ((*pagertab[object->type]->pgo_getpages)(object, m, count, reqpage));
|
||||
}
|
||||
|
||||
static __inline int
|
||||
static __inline void
|
||||
vm_pager_put_pages(
|
||||
vm_object_t object,
|
||||
vm_page_t *m,
|
||||
@ -121,7 +120,8 @@ vm_pager_put_pages(
|
||||
int flags,
|
||||
int *rtvals
|
||||
) {
|
||||
return ((*pagertab[object->type]->pgo_putpages)(object, m, count, flags, rtvals));
|
||||
(*pagertab[object->type]->pgo_putpages)
|
||||
(object, m, count, flags, rtvals);
|
||||
}
|
||||
|
||||
static __inline boolean_t
|
||||
|
@ -38,7 +38,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)vnode_pager.c 7.5 (Berkeley) 4/20/91
|
||||
* $Id: vnode_pager.c,v 1.101 1998/12/04 18:39:44 rvb Exp $
|
||||
* $Id: vnode_pager.c,v 1.102 1999/01/21 08:29:12 dillon Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -75,7 +75,7 @@ static int vnode_pager_input_smlfs __P((vm_object_t object, vm_page_t m));
|
||||
static int vnode_pager_input_old __P((vm_object_t object, vm_page_t m));
|
||||
static void vnode_pager_dealloc __P((vm_object_t));
|
||||
static int vnode_pager_getpages __P((vm_object_t, vm_page_t *, int, int));
|
||||
static int vnode_pager_putpages __P((vm_object_t, vm_page_t *, int, boolean_t, int *));
|
||||
static void vnode_pager_putpages __P((vm_object_t, vm_page_t *, int, boolean_t, int *));
|
||||
static boolean_t vnode_pager_haspage __P((vm_object_t, vm_pindex_t, int *, int *));
|
||||
|
||||
struct pagerops vnodepagerops = {
|
||||
@ -821,7 +821,7 @@ vnode_pager_generic_getpages(vp, m, bytecount, reqpage)
|
||||
* All other FS's should use the bypass to get to the local media
|
||||
* backing vp's VOP_PUTPAGES.
|
||||
*/
|
||||
static int
|
||||
static void
|
||||
vnode_pager_putpages(object, m, count, sync, rtvals)
|
||||
vm_object_t object;
|
||||
vm_page_t *m;
|
||||
@ -839,7 +839,6 @@ vnode_pager_putpages(object, m, count, sync, rtvals)
|
||||
printf("vnode_pager: *** WARNING *** stale FS putpages\n");
|
||||
rtval = vnode_pager_generic_putpages( vp, m, bytes, sync, rtvals);
|
||||
}
|
||||
return rtval;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user