Changeset View
Changeset View
Standalone View
Standalone View
head/sys/vm/vnode_pager.c
Show First 20 Lines • Show All 729 Lines • ▼ Show 20 Lines | |||||
*/ | */ | ||||
static int | static int | ||||
vnode_pager_getpages(vm_object_t object, vm_page_t *m, int count, int *rbehind, | vnode_pager_getpages(vm_object_t object, vm_page_t *m, int count, int *rbehind, | ||||
int *rahead) | int *rahead) | ||||
{ | { | ||||
struct vnode *vp; | struct vnode *vp; | ||||
int rtval; | int rtval; | ||||
/* Handle is stable with paging in progress. */ | |||||
vp = object->handle; | vp = object->handle; | ||||
VM_OBJECT_WUNLOCK(object); | |||||
rtval = VOP_GETPAGES(vp, m, count, rbehind, rahead); | rtval = VOP_GETPAGES(vp, m, count, rbehind, rahead); | ||||
KASSERT(rtval != EOPNOTSUPP, | KASSERT(rtval != EOPNOTSUPP, | ||||
("vnode_pager: FS getpages not implemented\n")); | ("vnode_pager: FS getpages not implemented\n")); | ||||
VM_OBJECT_WLOCK(object); | |||||
return rtval; | return rtval; | ||||
} | } | ||||
static int | static int | ||||
vnode_pager_getpages_async(vm_object_t object, vm_page_t *m, int count, | vnode_pager_getpages_async(vm_object_t object, vm_page_t *m, int count, | ||||
int *rbehind, int *rahead, vop_getpages_iodone_t iodone, void *arg) | int *rbehind, int *rahead, vop_getpages_iodone_t iodone, void *arg) | ||||
{ | { | ||||
struct vnode *vp; | struct vnode *vp; | ||||
int rtval; | int rtval; | ||||
vp = object->handle; | vp = object->handle; | ||||
VM_OBJECT_WUNLOCK(object); | |||||
rtval = VOP_GETPAGES_ASYNC(vp, m, count, rbehind, rahead, iodone, arg); | rtval = VOP_GETPAGES_ASYNC(vp, m, count, rbehind, rahead, iodone, arg); | ||||
KASSERT(rtval != EOPNOTSUPP, | KASSERT(rtval != EOPNOTSUPP, | ||||
("vnode_pager: FS getpages_async not implemented\n")); | ("vnode_pager: FS getpages_async not implemented\n")); | ||||
VM_OBJECT_WLOCK(object); | |||||
return (rtval); | return (rtval); | ||||
} | } | ||||
/* | /* | ||||
* The implementation of VOP_GETPAGES() and VOP_GETPAGES_ASYNC() for | * The implementation of VOP_GETPAGES() and VOP_GETPAGES_ASYNC() for | ||||
* local filesystems, where partially valid pages can only occur at | * local filesystems, where partially valid pages can only occur at | ||||
* the end of file. | * the end of file. | ||||
*/ | */ | ||||
▲ Show 20 Lines • Show All 817 Lines • Show Last 20 Lines |