git://git.camperquake.de
/
zfs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Support the fallocate() file operation.
[zfs.git]
/
module
/
zfs
/
zpl_inode.c
diff --git
a/module/zfs/zpl_inode.c
b/module/zfs/zpl_inode.c
index
2d197a4
..
9b55337
100644
(file)
--- a/
module/zfs/zpl_inode.c
+++ b/
module/zfs/zpl_inode.c
@@
-342,6
+342,15
@@
zpl_truncate_range(struct inode* ip, loff_t start, loff_t end)
crfree(cr);
}
crfree(cr);
}
+#ifdef HAVE_INODE_FALLOCATE
+static long
+zpl_fallocate(struct inode *ip, int mode, loff_t offset, loff_t len)
+{
+ return zpl_fallocate_common(ip, mode, offset, len);
+}
+#endif /* HAVE_INODE_FALLOCATE */
+
+
const struct inode_operations zpl_inode_operations = {
.create = zpl_create,
.link = zpl_link,
const struct inode_operations zpl_inode_operations = {
.create = zpl_create,
.link = zpl_link,
@@
-358,6
+367,9
@@
const struct inode_operations zpl_inode_operations = {
.removexattr = generic_removexattr,
.listxattr = zpl_xattr_list,
.truncate_range = zpl_truncate_range,
.removexattr = generic_removexattr,
.listxattr = zpl_xattr_list,
.truncate_range = zpl_truncate_range,
+#ifdef HAVE_INODE_FALLOCATE
+ .fallocate = zpl_fallocate,
+#endif /* HAVE_INODE_FALLOCATE */
};
const struct inode_operations zpl_dir_inode_operations = {
};
const struct inode_operations zpl_dir_inode_operations = {