|
@@ -363,7 +363,6 @@ struct inode_operations {
|
|
|
ssize_t (*getxattr) (struct dentry *, const char *, void *, size_t);
|
|
|
ssize_t (*listxattr) (struct dentry *, char *, size_t);
|
|
|
int (*removexattr) (struct dentry *, const char *);
|
|
|
- void (*truncate_range)(struct inode *, loff_t, loff_t);
|
|
|
};
|
|
|
|
|
|
Again, all methods are called without any locks being held, unless
|
|
@@ -472,9 +471,6 @@ otherwise noted.
|
|
|
removexattr: called by the VFS to remove an extended attribute from
|
|
|
a file. This method is called by removexattr(2) system call.
|
|
|
|
|
|
- truncate_range: a method provided by the underlying filesystem to truncate a
|
|
|
- range of blocks , i.e. punch a hole somewhere in a file.
|
|
|
-
|
|
|
|
|
|
The Address Space Object
|
|
|
========================
|
|
@@ -760,7 +756,7 @@ struct file_operations
|
|
|
----------------------
|
|
|
|
|
|
This describes how the VFS can manipulate an open file. As of kernel
|
|
|
-2.6.22, the following members are defined:
|
|
|
+3.5, the following members are defined:
|
|
|
|
|
|
struct file_operations {
|
|
|
struct module *owner;
|
|
@@ -790,6 +786,8 @@ struct file_operations {
|
|
|
int (*flock) (struct file *, int, struct file_lock *);
|
|
|
ssize_t (*splice_write)(struct pipe_inode_info *, struct file *, size_t, unsigned int);
|
|
|
ssize_t (*splice_read)(struct file *, struct pipe_inode_info *, size_t, unsigned int);
|
|
|
+ int (*setlease)(struct file *, long arg, struct file_lock **);
|
|
|
+ long (*fallocate)(struct file *, int mode, loff_t offset, loff_t len);
|
|
|
};
|
|
|
|
|
|
Again, all methods are called without any locks being held, unless
|
|
@@ -858,6 +856,11 @@ otherwise noted.
|
|
|
splice_read: called by the VFS to splice data from file to a pipe. This
|
|
|
method is used by the splice(2) system call
|
|
|
|
|
|
+ setlease: called by the VFS to set or release a file lock lease.
|
|
|
+ setlease has the file_lock_lock held and must not sleep.
|
|
|
+
|
|
|
+ fallocate: called by the VFS to preallocate blocks or punch a hole.
|
|
|
+
|
|
|
Note that the file operations are implemented by the specific
|
|
|
filesystem in which the inode resides. When opening a device node
|
|
|
(character or block special) most filesystems will call special
|