aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/filesystems
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/filesystems')
-rw-r--r--Documentation/filesystems/Locking21
-rw-r--r--Documentation/filesystems/porting5
-rw-r--r--Documentation/filesystems/vfat.txt11
-rw-r--r--Documentation/filesystems/vfs.txt16
4 files changed, 40 insertions, 13 deletions
diff --git a/Documentation/filesystems/Locking b/Documentation/filesystems/Locking
index e0cce2a5f820..e540a24e5d06 100644
--- a/Documentation/filesystems/Locking
+++ b/Documentation/filesystems/Locking
@@ -114,7 +114,6 @@ prototypes:
114 int (*drop_inode) (struct inode *); 114 int (*drop_inode) (struct inode *);
115 void (*evict_inode) (struct inode *); 115 void (*evict_inode) (struct inode *);
116 void (*put_super) (struct super_block *); 116 void (*put_super) (struct super_block *);
117 void (*write_super) (struct super_block *);
118 int (*sync_fs)(struct super_block *sb, int wait); 117 int (*sync_fs)(struct super_block *sb, int wait);
119 int (*freeze_fs) (struct super_block *); 118 int (*freeze_fs) (struct super_block *);
120 int (*unfreeze_fs) (struct super_block *); 119 int (*unfreeze_fs) (struct super_block *);
@@ -136,10 +135,9 @@ write_inode:
136drop_inode: !!!inode->i_lock!!! 135drop_inode: !!!inode->i_lock!!!
137evict_inode: 136evict_inode:
138put_super: write 137put_super: write
139write_super: read
140sync_fs: read 138sync_fs: read
141freeze_fs: read 139freeze_fs: write
142unfreeze_fs: read 140unfreeze_fs: write
143statfs: maybe(read) (see below) 141statfs: maybe(read) (see below)
144remount_fs: write 142remount_fs: write
145umount_begin: no 143umount_begin: no
@@ -206,6 +204,8 @@ prototypes:
206 int (*launder_page)(struct page *); 204 int (*launder_page)(struct page *);
207 int (*is_partially_uptodate)(struct page *, read_descriptor_t *, unsigned long); 205 int (*is_partially_uptodate)(struct page *, read_descriptor_t *, unsigned long);
208 int (*error_remove_page)(struct address_space *, struct page *); 206 int (*error_remove_page)(struct address_space *, struct page *);
207 int (*swap_activate)(struct file *);
208 int (*swap_deactivate)(struct file *);
209 209
210locking rules: 210locking rules:
211 All except set_page_dirty and freepage may block 211 All except set_page_dirty and freepage may block
@@ -229,6 +229,8 @@ migratepage: yes (both)
229launder_page: yes 229launder_page: yes
230is_partially_uptodate: yes 230is_partially_uptodate: yes
231error_remove_page: yes 231error_remove_page: yes
232swap_activate: no
233swap_deactivate: no
232 234
233 ->write_begin(), ->write_end(), ->sync_page() and ->readpage() 235 ->write_begin(), ->write_end(), ->sync_page() and ->readpage()
234may be called from the request handler (/dev/loop). 236may be called from the request handler (/dev/loop).
@@ -330,6 +332,15 @@ cleaned, or an error value if not. Note that in order to prevent the page
330getting mapped back in and redirtied, it needs to be kept locked 332getting mapped back in and redirtied, it needs to be kept locked
331across the entire operation. 333across the entire operation.
332 334
335 ->swap_activate will be called with a non-zero argument on
336files backing (non block device backed) swapfiles. A return value
337of zero indicates success, in which case this file can be used for
338backing swapspace. The swapspace operations will be proxied to the
339address space operations.
340
341 ->swap_deactivate() will be called in the sys_swapoff()
342path after ->swap_activate() returned success.
343
333----------------------- file_lock_operations ------------------------------ 344----------------------- file_lock_operations ------------------------------
334prototypes: 345prototypes:
335 void (*fl_copy_lock)(struct file_lock *, struct file_lock *); 346 void (*fl_copy_lock)(struct file_lock *, struct file_lock *);
@@ -346,7 +357,6 @@ prototypes:
346 int (*lm_compare_owner)(struct file_lock *, struct file_lock *); 357 int (*lm_compare_owner)(struct file_lock *, struct file_lock *);
347 void (*lm_notify)(struct file_lock *); /* unblock callback */ 358 void (*lm_notify)(struct file_lock *); /* unblock callback */
348 int (*lm_grant)(struct file_lock *, struct file_lock *, int); 359 int (*lm_grant)(struct file_lock *, struct file_lock *, int);
349 void (*lm_release_private)(struct file_lock *);
350 void (*lm_break)(struct file_lock *); /* break_lease callback */ 360 void (*lm_break)(struct file_lock *); /* break_lease callback */
351 int (*lm_change)(struct file_lock **, int); 361 int (*lm_change)(struct file_lock **, int);
352 362
@@ -355,7 +365,6 @@ locking rules:
355lm_compare_owner: yes no 365lm_compare_owner: yes no
356lm_notify: yes no 366lm_notify: yes no
357lm_grant: no no 367lm_grant: no no
358lm_release_private: maybe no
359lm_break: yes no 368lm_break: yes no
360lm_change yes no 369lm_change yes no
361 370
diff --git a/Documentation/filesystems/porting b/Documentation/filesystems/porting
index 2bef2b3843d1..0742feebc6e2 100644
--- a/Documentation/filesystems/porting
+++ b/Documentation/filesystems/porting
@@ -94,9 +94,8 @@ protected.
94--- 94---
95[mandatory] 95[mandatory]
96 96
97BKL is also moved from around sb operations. ->write_super() Is now called 97BKL is also moved from around sb operations. BKL should have been shifted into
98without BKL held. BKL should have been shifted into individual fs sb_op 98individual fs sb_op functions. If you don't need it, remove it.
99functions. If you don't need it, remove it.
100 99
101--- 100---
102[informational] 101[informational]
diff --git a/Documentation/filesystems/vfat.txt b/Documentation/filesystems/vfat.txt
index ead764b2728f..de1e6c4dccff 100644
--- a/Documentation/filesystems/vfat.txt
+++ b/Documentation/filesystems/vfat.txt
@@ -137,6 +137,17 @@ errors=panic|continue|remount-ro
137 without doing anything or remount the partition in 137 without doing anything or remount the partition in
138 read-only mode (default behavior). 138 read-only mode (default behavior).
139 139
140discard -- If set, issues discard/TRIM commands to the block
141 device when blocks are freed. This is useful for SSD devices
142 and sparse/thinly-provisoned LUNs.
143
144nfs -- This option maintains an index (cache) of directory
145 inodes by i_logstart which is used by the nfs-related code to
146 improve look-ups.
147
148 Enable this only if you want to export the FAT filesystem
149 over NFS
150
140<bool>: 0,1,yes,no,true,false 151<bool>: 0,1,yes,no,true,false
141 152
142TODO 153TODO
diff --git a/Documentation/filesystems/vfs.txt b/Documentation/filesystems/vfs.txt
index aa754e01464e..2ee133e030c3 100644
--- a/Documentation/filesystems/vfs.txt
+++ b/Documentation/filesystems/vfs.txt
@@ -216,7 +216,6 @@ struct super_operations {
216 void (*drop_inode) (struct inode *); 216 void (*drop_inode) (struct inode *);
217 void (*delete_inode) (struct inode *); 217 void (*delete_inode) (struct inode *);
218 void (*put_super) (struct super_block *); 218 void (*put_super) (struct super_block *);
219 void (*write_super) (struct super_block *);
220 int (*sync_fs)(struct super_block *sb, int wait); 219 int (*sync_fs)(struct super_block *sb, int wait);
221 int (*freeze_fs) (struct super_block *); 220 int (*freeze_fs) (struct super_block *);
222 int (*unfreeze_fs) (struct super_block *); 221 int (*unfreeze_fs) (struct super_block *);
@@ -273,9 +272,6 @@ or bottom half).
273 put_super: called when the VFS wishes to free the superblock 272 put_super: called when the VFS wishes to free the superblock
274 (i.e. unmount). This is called with the superblock lock held 273 (i.e. unmount). This is called with the superblock lock held
275 274
276 write_super: called when the VFS superblock needs to be written to
277 disc. This method is optional
278
279 sync_fs: called when VFS is writing out all dirty data associated with 275 sync_fs: called when VFS is writing out all dirty data associated with
280 a superblock. The second parameter indicates whether the method 276 a superblock. The second parameter indicates whether the method
281 should wait until the write out has been completed. Optional. 277 should wait until the write out has been completed. Optional.
@@ -592,6 +588,8 @@ struct address_space_operations {
592 int (*migratepage) (struct page *, struct page *); 588 int (*migratepage) (struct page *, struct page *);
593 int (*launder_page) (struct page *); 589 int (*launder_page) (struct page *);
594 int (*error_remove_page) (struct mapping *mapping, struct page *page); 590 int (*error_remove_page) (struct mapping *mapping, struct page *page);
591 int (*swap_activate)(struct file *);
592 int (*swap_deactivate)(struct file *);
595}; 593};
596 594
597 writepage: called by the VM to write a dirty page to backing store. 595 writepage: called by the VM to write a dirty page to backing store.
@@ -760,6 +758,16 @@ struct address_space_operations {
760 Setting this implies you deal with pages going away under you, 758 Setting this implies you deal with pages going away under you,
761 unless you have them locked or reference counts increased. 759 unless you have them locked or reference counts increased.
762 760
761 swap_activate: Called when swapon is used on a file to allocate
762 space if necessary and pin the block lookup information in
763 memory. A return value of zero indicates success,
764 in which case this file can be used to back swapspace. The
765 swapspace operations will be proxied to this address space's
766 ->swap_{out,in} methods.
767
768 swap_deactivate: Called during swapoff on files where swap_activate
769 was successful.
770
763 771
764The File Object 772The File Object
765=============== 773===============