aboutsummaryrefslogtreecommitdiffstats
path: root/include/sys/zfs_vnops.h
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2011-03-08 11:04:51 -0800
committerBrian Behlendorf <[email protected]>2011-03-08 11:04:51 -0800
commit126400a1ca656d41dea9d2ad88afbec3ed32d391 (patch)
treedb02ef882240eb9c51511e4a45155ce634c265ec /include/sys/zfs_vnops.h
parent53cf50e0816a89749b3ea4d51d5d9c9605bcc3e8 (diff)
Add zfs_open()/zfs_close()
In the original implementation the zfs_open()/zfs_close() hooks were dropped for simplicity. This was functional but not 100% correct with the expected ZFS sematics. Updating and re-adding the zfs_open()/zfs_close() hooks resolves the following issues. 1) The ZFS_APPENDONLY file attribute is once again honored. While there are still no Linux tools to set/clear these attributes once there are it should behave correctly. 2) Minimal virus scan file attribute hooks were added. Once again this support in disabled but the infrastructure is back in place. 3) Most importantly correctly handle assigning files which were opened syncronously to the intent log. Without this change O_SYNC modifications could be lost during a system crash even though they were marked synchronous.
Diffstat (limited to 'include/sys/zfs_vnops.h')
-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 bdc54941e..b1c7c9f53 100644
--- a/include/sys/zfs_vnops.h
+++ b/include/sys/zfs_vnops.h
@@ -36,6 +36,8 @@
extern "C" {
#endif
+extern int zfs_open(struct inode *ip, int mode, int flag, cred_t *cr);
+extern int zfs_close(struct inode *ip, int flag, cred_t *cr);
extern int zfs_read(struct inode *ip, uio_t *uio, int ioflag, cred_t *cr);
extern int zfs_write(struct inode *ip, uio_t *uio, int ioflag, cred_t *cr);
extern int zfs_access(struct inode *ip, int mode, int flag, cred_t *cr);