aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/filesystems/vfs.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/filesystems/vfs.txt')
-rw-r--r--Documentation/filesystems/vfs.txt17
1 files changed, 12 insertions, 5 deletions
diff --git a/Documentation/filesystems/vfs.txt b/Documentation/filesystems/vfs.txt
index 0d0492028082..efd23f481704 100644
--- a/Documentation/filesystems/vfs.txt
+++ b/Documentation/filesystems/vfs.txt
@@ -363,7 +363,7 @@ struct inode_operations {
363 ssize_t (*getxattr) (struct dentry *, const char *, void *, size_t); 363 ssize_t (*getxattr) (struct dentry *, const char *, void *, size_t);
364 ssize_t (*listxattr) (struct dentry *, char *, size_t); 364 ssize_t (*listxattr) (struct dentry *, char *, size_t);
365 int (*removexattr) (struct dentry *, const char *); 365 int (*removexattr) (struct dentry *, const char *);
366 void (*truncate_range)(struct inode *, loff_t, loff_t); 366 void (*update_time)(struct inode *, struct timespec *, int);
367}; 367};
368 368
369Again, all methods are called without any locks being held, unless 369Again, all methods are called without any locks being held, unless
@@ -472,9 +472,9 @@ otherwise noted.
472 removexattr: called by the VFS to remove an extended attribute from 472 removexattr: called by the VFS to remove an extended attribute from
473 a file. This method is called by removexattr(2) system call. 473 a file. This method is called by removexattr(2) system call.
474 474
475 truncate_range: a method provided by the underlying filesystem to truncate a 475 update_time: called by the VFS to update a specific time or the i_version of
476 range of blocks , i.e. punch a hole somewhere in a file. 476 an inode. If this is not defined the VFS will update the inode itself
477 477 and call mark_inode_dirty_sync.
478 478
479The Address Space Object 479The Address Space Object
480======================== 480========================
@@ -760,7 +760,7 @@ struct file_operations
760---------------------- 760----------------------
761 761
762This describes how the VFS can manipulate an open file. As of kernel 762This describes how the VFS can manipulate an open file. As of kernel
7632.6.22, the following members are defined: 7633.5, the following members are defined:
764 764
765struct file_operations { 765struct file_operations {
766 struct module *owner; 766 struct module *owner;
@@ -790,6 +790,8 @@ struct file_operations {
790 int (*flock) (struct file *, int, struct file_lock *); 790 int (*flock) (struct file *, int, struct file_lock *);
791 ssize_t (*splice_write)(struct pipe_inode_info *, struct file *, size_t, unsigned int); 791 ssize_t (*splice_write)(struct pipe_inode_info *, struct file *, size_t, unsigned int);
792 ssize_t (*splice_read)(struct file *, struct pipe_inode_info *, size_t, unsigned int); 792 ssize_t (*splice_read)(struct file *, struct pipe_inode_info *, size_t, unsigned int);
793 int (*setlease)(struct file *, long arg, struct file_lock **);
794 long (*fallocate)(struct file *, int mode, loff_t offset, loff_t len);
793}; 795};
794 796
795Again, all methods are called without any locks being held, unless 797Again, all methods are called without any locks being held, unless
@@ -858,6 +860,11 @@ otherwise noted.
858 splice_read: called by the VFS to splice data from file to a pipe. This 860 splice_read: called by the VFS to splice data from file to a pipe. This
859 method is used by the splice(2) system call 861 method is used by the splice(2) system call
860 862
863 setlease: called by the VFS to set or release a file lock lease.
864 setlease has the file_lock_lock held and must not sleep.
865
866 fallocate: called by the VFS to preallocate blocks or punch a hole.
867
861Note that the file operations are implemented by the specific 868Note that the file operations are implemented by the specific
862filesystem in which the inode resides. When opening a device node 869filesystem in which the inode resides. When opening a device node
863(character or block special) most filesystems will call special 870(character or block special) most filesystems will call special