Skip to content

Commit

Permalink
MMAP Optimization
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Issue openzfs#255
  • Loading branch information
Prasad Joshi authored and behlendorf committed Jul 1, 2011
1 parent 2a00596 commit dde471e
Show file tree
Hide file tree
Showing 4 changed files with 178 additions and 327 deletions.
3 changes: 3 additions & 0 deletions include/sys/zfs_vnops.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
1 change: 1 addition & 0 deletions include/sys/zpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include <linux/vfs_compat.h>
#include <linux/xattr_compat.h>
#include <linux/exportfs.h>
#include <linux/writeback.h>

/* zpl_inode.c */
extern const struct inode_operations zpl_inode_operations;
Expand Down
Loading

0 comments on commit dde471e

Please sign in to comment.