diff options
author | avg <avg@FreeBSD.org> | 2014-01-16 18:15:59 +0000 |
---|---|---|
committer | avg <avg@FreeBSD.org> | 2014-01-16 18:15:59 +0000 |
commit | cc2516d697b941b1c3f7bae5bfb6f91a3cde66bd (patch) | |
tree | 1b96a00b206a501b632492e7c4ea8ef6a5773ab7 /sys/cddl/compat | |
parent | f05153a94adcaac301b6af388b12797a4b7f6a82 (diff) | |
download | FreeBSD-src-cc2516d697b941b1c3f7bae5bfb6f91a3cde66bd.zip FreeBSD-src-cc2516d697b941b1c3f7bae5bfb6f91a3cde66bd.tar.gz |
MFC r258744-258746: zfs: add zfs_freebsd_putpages
Diffstat (limited to 'sys/cddl/compat')
-rw-r--r-- | sys/cddl/compat/opensolaris/kern/opensolaris_vm.c | 2 | ||||
-rw-r--r-- | sys/cddl/compat/opensolaris/sys/vm.h | 17 |
2 files changed, 19 insertions, 0 deletions
diff --git a/sys/cddl/compat/opensolaris/kern/opensolaris_vm.c b/sys/cddl/compat/opensolaris/kern/opensolaris_vm.c index 871f1c6..fe444ec 100644 --- a/sys/cddl/compat/opensolaris/kern/opensolaris_vm.c +++ b/sys/cddl/compat/opensolaris/kern/opensolaris_vm.c @@ -40,6 +40,8 @@ __FBSDID("$FreeBSD$"); const int zfs_vm_pagerret_bad = VM_PAGER_BAD; const int zfs_vm_pagerret_error = VM_PAGER_ERROR; const int zfs_vm_pagerret_ok = VM_PAGER_OK; +const int zfs_vm_pagerput_sync = VM_PAGER_PUT_SYNC; +const int zfs_vm_pagerput_inval = VM_PAGER_PUT_INVAL; void zfs_vmobject_assert_wlocked(vm_object_t object) diff --git a/sys/cddl/compat/opensolaris/sys/vm.h b/sys/cddl/compat/opensolaris/sys/vm.h index 40e4ffa..7e74f48 100644 --- a/sys/cddl/compat/opensolaris/sys/vm.h +++ b/sys/cddl/compat/opensolaris/sys/vm.h @@ -31,14 +31,31 @@ #ifdef _KERNEL +#include <sys/sf_buf.h> + extern const int zfs_vm_pagerret_bad; extern const int zfs_vm_pagerret_error; extern const int zfs_vm_pagerret_ok; +extern const int zfs_vm_pagerput_sync; +extern const int zfs_vm_pagerput_inval; void zfs_vmobject_assert_wlocked(vm_object_t object); void zfs_vmobject_wlock(vm_object_t object); void zfs_vmobject_wunlock(vm_object_t object); +static inline caddr_t +zfs_map_page(vm_page_t pp, struct sf_buf **sfp) +{ + *sfp = sf_buf_alloc(pp, 0); + return ((caddr_t)sf_buf_kva(*sfp)); +} + +static inline void +zfs_unmap_page(struct sf_buf *sf) +{ + sf_buf_free(sf); +} + #endif /* _KERNEL */ #endif /* _OPENSOLARIS_SYS_VM_H_ */ |