summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2011-07-01 11:25:07 -0700
committerBrian Behlendorf <[email protected]>2011-07-01 12:23:46 -0700
commite2e7aa2df88708cdcae87688a69ba3f5d1cc43ed (patch)
tree392911d19bf1a0e0b1fd0e8862de029fa47e7be6 /include
parentf0b2486034f6a4d8cd1a139ff4604e6b9629a64e (diff)
Add ZFS specific mmap() checks
Under Linux the VFS handles virtually all of the mmap() access checks. Filesystem specific checks are left to be handled in the .mmap() hook and normally there arn't any. However, ZFS provides a few attributes which can influence the mmap behavior and should be honored. Note, currently the code to modify these attributes has not been implemented under Linux. * ZFS_IMMUTABLE | ZFS_READONLY | ZFS_APPENDONLY: when any of these attributes are set a file may not be mmaped with write access. * ZFS_AV_QUARANTINED: when set a file file may not be mmaped with read or exec access. Signed-off-by: Brian Behlendorf <[email protected]>
Diffstat (limited to 'include')
-rw-r--r--include/sys/zfs_vnops.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/sys/zfs_vnops.h b/include/sys/zfs_vnops.h
index 23218a45b..acc617b41 100644
--- a/include/sys/zfs_vnops.h
+++ b/include/sys/zfs_vnops.h
@@ -74,6 +74,8 @@ extern int zfs_setsecattr(struct inode *ip, vsecattr_t *vsecp, int flag,
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);
+extern int zfs_map(struct inode *ip, offset_t off, caddr_t *addrp,
+ size_t len, unsigned long vm_flags);
#ifdef __cplusplus
}