aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/filesystems/vfs.txt29
1 files changed, 16 insertions, 13 deletions
diff --git a/Documentation/filesystems/vfs.txt b/Documentation/filesystems/vfs.txt
index f023609fa718..045f3e055a28 100644
--- a/Documentation/filesystems/vfs.txt
+++ b/Documentation/filesystems/vfs.txt
@@ -197,7 +197,7 @@ struct super_operations
197----------------------- 197-----------------------
198 198
199This describes how the VFS can manipulate the superblock of your 199This describes how the VFS can manipulate the superblock of your
200filesystem. As of kernel 2.6.13, the following members are defined: 200filesystem. As of kernel 2.6.22, the following members are defined:
201 201
202struct super_operations { 202struct super_operations {
203 struct inode *(*alloc_inode)(struct super_block *sb); 203 struct inode *(*alloc_inode)(struct super_block *sb);
@@ -220,8 +220,6 @@ struct super_operations {
220 void (*clear_inode) (struct inode *); 220 void (*clear_inode) (struct inode *);
221 void (*umount_begin) (struct super_block *); 221 void (*umount_begin) (struct super_block *);
222 222
223 void (*sync_inodes) (struct super_block *sb,
224 struct writeback_control *wbc);
225 int (*show_options)(struct seq_file *, struct vfsmount *); 223 int (*show_options)(struct seq_file *, struct vfsmount *);
226 224
227 ssize_t (*quota_read)(struct super_block *, int, char *, size_t, loff_t); 225 ssize_t (*quota_read)(struct super_block *, int, char *, size_t, loff_t);
@@ -304,9 +302,6 @@ or bottom half).
304 302
305 umount_begin: called when the VFS is unmounting a filesystem. 303 umount_begin: called when the VFS is unmounting a filesystem.
306 304
307 sync_inodes: called when the VFS is writing out dirty data associated with
308 a superblock.
309
310 show_options: called by the VFS to show mount options for /proc/<pid>/mounts. 305 show_options: called by the VFS to show mount options for /proc/<pid>/mounts.
311 306
312 quota_read: called by the VFS to read from filesystem quota file. 307 quota_read: called by the VFS to read from filesystem quota file.
@@ -328,7 +323,7 @@ struct inode_operations
328----------------------- 323-----------------------
329 324
330This describes how the VFS can manipulate an inode in your 325This describes how the VFS can manipulate an inode in your
331filesystem. As of kernel 2.6.13, the following members are defined: 326filesystem. As of kernel 2.6.22, the following members are defined:
332 327
333struct inode_operations { 328struct inode_operations {
334 int (*create) (struct inode *,struct dentry *,int, struct nameidata *); 329 int (*create) (struct inode *,struct dentry *,int, struct nameidata *);
@@ -352,6 +347,7 @@ struct inode_operations {
352 ssize_t (*getxattr) (struct dentry *, const char *, void *, size_t); 347 ssize_t (*getxattr) (struct dentry *, const char *, void *, size_t);
353 ssize_t (*listxattr) (struct dentry *, char *, size_t); 348 ssize_t (*listxattr) (struct dentry *, char *, size_t);
354 int (*removexattr) (struct dentry *, const char *); 349 int (*removexattr) (struct dentry *, const char *);
350 void (*truncate_range)(struct inode *, loff_t, loff_t);
355}; 351};
356 352
357Again, all methods are called without any locks being held, unless 353Again, all methods are called without any locks being held, unless
@@ -448,6 +444,9 @@ otherwise noted.
448 removexattr: called by the VFS to remove an extended attribute from 444 removexattr: called by the VFS to remove an extended attribute from
449 a file. This method is called by removexattr(2) system call. 445 a file. This method is called by removexattr(2) system call.
450 446
447 truncate_range: a method provided by the underlying filesystem to truncate a
448 range of blocks , i.e. punch a hole somewhere in a file.
449
451 450
452The Address Space Object 451The Address Space Object
453======================== 452========================
@@ -526,7 +525,7 @@ struct address_space_operations
526------------------------------- 525-------------------------------
527 526
528This describes how the VFS can manipulate mapping of a file to page cache in 527This describes how the VFS can manipulate mapping of a file to page cache in
529your filesystem. As of kernel 2.6.16, the following members are defined: 528your filesystem. As of kernel 2.6.22, the following members are defined:
530 529
531struct address_space_operations { 530struct address_space_operations {
532 int (*writepage)(struct page *page, struct writeback_control *wbc); 531 int (*writepage)(struct page *page, struct writeback_control *wbc);
@@ -547,6 +546,7 @@ struct address_space_operations {
547 int); 546 int);
548 /* migrate the contents of a page to the specified target */ 547 /* migrate the contents of a page to the specified target */
549 int (*migratepage) (struct page *, struct page *); 548 int (*migratepage) (struct page *, struct page *);
549 int (*launder_page) (struct page *);
550}; 550};
551 551
552 writepage: called by the VM to write a dirty page to backing store. 552 writepage: called by the VM to write a dirty page to backing store.
@@ -693,6 +693,10 @@ struct address_space_operations {
693 transfer any private data across and update any references 693 transfer any private data across and update any references
694 that it has to the page. 694 that it has to the page.
695 695
696 launder_page: Called before freeing a page - it writes back the dirty page. To
697 prevent redirtying the page, it is kept locked during the whole
698 operation.
699
696The File Object 700The File Object
697=============== 701===============
698 702
@@ -703,9 +707,10 @@ struct file_operations
703---------------------- 707----------------------
704 708
705This describes how the VFS can manipulate an open file. As of kernel 709This describes how the VFS can manipulate an open file. As of kernel
7062.6.17, the following members are defined: 7102.6.22, the following members are defined:
707 711
708struct file_operations { 712struct file_operations {
713 struct module *owner;
709 loff_t (*llseek) (struct file *, loff_t, int); 714 loff_t (*llseek) (struct file *, loff_t, int);
710 ssize_t (*read) (struct file *, char __user *, size_t, loff_t *); 715 ssize_t (*read) (struct file *, char __user *, size_t, loff_t *);
711 ssize_t (*write) (struct file *, const char __user *, size_t, loff_t *); 716 ssize_t (*write) (struct file *, const char __user *, size_t, loff_t *);
@@ -732,10 +737,8 @@ struct file_operations {
732 int (*check_flags)(int); 737 int (*check_flags)(int);
733 int (*dir_notify)(struct file *filp, unsigned long arg); 738 int (*dir_notify)(struct file *filp, unsigned long arg);
734 int (*flock) (struct file *, int, struct file_lock *); 739 int (*flock) (struct file *, int, struct file_lock *);
735 ssize_t (*splice_write)(struct pipe_inode_info *, struct file *, size_t, unsigned 740 ssize_t (*splice_write)(struct pipe_inode_info *, struct file *, size_t, unsigned int);
736int); 741 ssize_t (*splice_read)(struct file *, struct pipe_inode_info *, size_t, unsigned int);
737 ssize_t (*splice_read)(struct file *, struct pipe_inode_info *, size_t, unsigned
738int);
739}; 742};
740 743
741Again, all methods are called without any locks being held, unless 744Again, all methods are called without any locks being held, unless