From dde471ef5a07bd569deeadd3e9a88655db3e10ab Mon Sep 17 00:00:00 2001 From: Prasad Joshi Date: Sat, 28 May 2011 02:53:07 +0100 Subject: MMAP Optimization Enable zfs_getpage, zfs_fillpage, zfs_putpage, zfs_putapage functions. The functions have been modified to make them Linux friendly. ZFS uses these functions to read/write the mmapped pages. Using them from readpage/writepage results in clear code. The patch also adds readpages and writepages interface functions to read/write list of pages in one function call. The code change handles the first mmap optimization mentioned on https://github.com/behlendorf/zfs/issues/225 Signed-off-by: Prasad Joshi Signed-off-by: Brian Behlendorf Issue #255 --- include/sys/zfs_vnops.h | 3 +++ include/sys/zpl.h | 1 + 2 files changed, 4 insertions(+) (limited to 'include/sys') diff --git a/include/sys/zfs_vnops.h b/include/sys/zfs_vnops.h index b1c7c9f53..23218a45b 100644 --- a/include/sys/zfs_vnops.h +++ b/include/sys/zfs_vnops.h @@ -71,6 +71,9 @@ extern int zfs_getsecattr(struct inode *ip, vsecattr_t *vsecp, int flag, cred_t *cr); extern int zfs_setsecattr(struct inode *ip, vsecattr_t *vsecp, int flag, cred_t *cr); +extern int zfs_getpage(struct inode *ip, struct page *pl[], int nr_pages); +extern int zfs_putpage(struct page *page, struct writeback_control *wbc, + void *data); #ifdef __cplusplus } diff --git a/include/sys/zpl.h b/include/sys/zpl.h index 721347585..906b5a73d 100644 --- a/include/sys/zpl.h +++ b/include/sys/zpl.h @@ -29,6 +29,7 @@ #include #include #include +#include /* zpl_inode.c */ extern const struct inode_operations zpl_inode_operations; -- cgit v1.2.3