aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/filesystems/vfs.txt
diff options
context:
space:
mode:
authorHugh Dickins <hughd@google.com>2012-05-29 18:06:41 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-05-29 19:22:23 -0400
commit17cf28afea2a1112f240a3a2da8af883be024811 (patch)
treeed9e3eb9b1d44118a12e4ecdf369e3b9b3208be1 /Documentation/filesystems/vfs.txt
parent3f31d07571eeea18a7d34db9af21d2285b807a17 (diff)
mm/fs: remove truncate_range
Remove vmtruncate_range(), and remove the truncate_range method from struct inode_operations: only tmpfs ever supported it, and tmpfs has now converted over to using the fallocate method of file_operations. Update Documentation accordingly, adding (setlease and) fallocate lines. And while we're in mm.h, remove duplicate declarations of shmem_lock() and shmem_file_setup(): everyone is now using the ones in shmem_fs.h. Based-on-patch-by: Cong Wang <amwang@redhat.com> Signed-off-by: Hugh Dickins <hughd@google.com> Cc: Christoph Hellwig <hch@infradead.org> Cc: Cong Wang <amwang@redhat.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'Documentation/filesystems/vfs.txt')
-rw-r--r--Documentation/filesystems/vfs.txt13
1 files changed, 8 insertions, 5 deletions
diff --git a/Documentation/filesystems/vfs.txt b/Documentation/filesystems/vfs.txt
index 0d0492028082..ef19f91a0f12 100644
--- a/Documentation/filesystems/vfs.txt
+++ b/Documentation/filesystems/vfs.txt
@@ -363,7 +363,6 @@ 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);
367}; 366};
368 367
369Again, all methods are called without any locks being held, unless 368Again, all methods are called without any locks being held, unless
@@ -472,9 +471,6 @@ otherwise noted.
472 removexattr: called by the VFS to remove an extended attribute from 471 removexattr: called by the VFS to remove an extended attribute from
473 a file. This method is called by removexattr(2) system call. 472 a file. This method is called by removexattr(2) system call.
474 473
475 truncate_range: a method provided by the underlying filesystem to truncate a
476 range of blocks , i.e. punch a hole somewhere in a file.
477
478 474
479The Address Space Object 475The Address Space Object
480======================== 476========================
@@ -760,7 +756,7 @@ struct file_operations
760---------------------- 756----------------------
761 757
762This describes how the VFS can manipulate an open file. As of kernel 758This describes how the VFS can manipulate an open file. As of kernel
7632.6.22, the following members are defined: 7593.5, the following members are defined:
764 760
765struct file_operations { 761struct file_operations {
766 struct module *owner; 762 struct module *owner;
@@ -790,6 +786,8 @@ struct file_operations {
790 int (*flock) (struct file *, int, struct file_lock *); 786 int (*flock) (struct file *, int, struct file_lock *);
791 ssize_t (*splice_write)(struct pipe_inode_info *, struct file *, size_t, unsigned int); 787 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); 788 ssize_t (*splice_read)(struct file *, struct pipe_inode_info *, size_t, unsigned int);
789 int (*setlease)(struct file *, long arg, struct file_lock **);
790 long (*fallocate)(struct file *, int mode, loff_t offset, loff_t len);
793}; 791};
794 792
795Again, all methods are called without any locks being held, unless 793Again, all methods are called without any locks being held, unless
@@ -858,6 +856,11 @@ otherwise noted.
858 splice_read: called by the VFS to splice data from file to a pipe. This 856 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 857 method is used by the splice(2) system call
860 858
859 setlease: called by the VFS to set or release a file lock lease.
860 setlease has the file_lock_lock held and must not sleep.
861
862 fallocate: called by the VFS to preallocate blocks or punch a hole.
863
861Note that the file operations are implemented by the specific 864Note that the file operations are implemented by the specific
862filesystem in which the inode resides. When opening a device node 865filesystem in which the inode resides. When opening a device node
863(character or block special) most filesystems will call special 866(character or block special) most filesystems will call special