diff options
Diffstat (limited to 'Documentation/filesystems/Locking')
-rw-r--r-- | Documentation/filesystems/Locking | 30 |
1 files changed, 22 insertions, 8 deletions
diff --git a/Documentation/filesystems/Locking b/Documentation/filesystems/Locking index 8e2da1e06e3b..0f103e39b4f6 100644 --- a/Documentation/filesystems/Locking +++ b/Documentation/filesystems/Locking | |||
@@ -9,7 +9,7 @@ be able to use diff(1). | |||
9 | 9 | ||
10 | --------------------------- dentry_operations -------------------------- | 10 | --------------------------- dentry_operations -------------------------- |
11 | prototypes: | 11 | prototypes: |
12 | int (*d_revalidate)(struct dentry *, struct nameidata *); | 12 | int (*d_revalidate)(struct dentry *, unsigned int); |
13 | int (*d_hash)(const struct dentry *, const struct inode *, | 13 | int (*d_hash)(const struct dentry *, const struct inode *, |
14 | struct qstr *); | 14 | struct qstr *); |
15 | int (*d_compare)(const struct dentry *, const struct inode *, | 15 | int (*d_compare)(const struct dentry *, const struct inode *, |
@@ -37,9 +37,8 @@ d_manage: no no yes (ref-walk) maybe | |||
37 | 37 | ||
38 | --------------------------- inode_operations --------------------------- | 38 | --------------------------- inode_operations --------------------------- |
39 | prototypes: | 39 | prototypes: |
40 | int (*create) (struct inode *,struct dentry *,umode_t, struct nameidata *); | 40 | int (*create) (struct inode *,struct dentry *,umode_t, bool); |
41 | struct dentry * (*lookup) (struct inode *,struct dentry *, struct nameid | 41 | struct dentry * (*lookup) (struct inode *,struct dentry *, unsigned int); |
42 | ata *); | ||
43 | int (*link) (struct dentry *,struct inode *,struct dentry *); | 42 | int (*link) (struct dentry *,struct inode *,struct dentry *); |
44 | int (*unlink) (struct inode *,struct dentry *); | 43 | int (*unlink) (struct inode *,struct dentry *); |
45 | int (*symlink) (struct inode *,struct dentry *,const char *); | 44 | int (*symlink) (struct inode *,struct dentry *,const char *); |
@@ -62,6 +61,9 @@ ata *); | |||
62 | int (*removexattr) (struct dentry *, const char *); | 61 | int (*removexattr) (struct dentry *, const char *); |
63 | int (*fiemap)(struct inode *, struct fiemap_extent_info *, u64 start, u64 len); | 62 | int (*fiemap)(struct inode *, struct fiemap_extent_info *, u64 start, u64 len); |
64 | void (*update_time)(struct inode *, struct timespec *, int); | 63 | void (*update_time)(struct inode *, struct timespec *, int); |
64 | int (*atomic_open)(struct inode *, struct dentry *, | ||
65 | struct file *, unsigned open_flag, | ||
66 | umode_t create_mode, int *opened); | ||
65 | 67 | ||
66 | locking rules: | 68 | locking rules: |
67 | all may block | 69 | all may block |
@@ -89,6 +91,7 @@ listxattr: no | |||
89 | removexattr: yes | 91 | removexattr: yes |
90 | fiemap: no | 92 | fiemap: no |
91 | update_time: no | 93 | update_time: no |
94 | atomic_open: yes | ||
92 | 95 | ||
93 | Additionally, ->rmdir(), ->unlink() and ->rename() have ->i_mutex on | 96 | Additionally, ->rmdir(), ->unlink() and ->rename() have ->i_mutex on |
94 | victim. | 97 | victim. |
@@ -135,8 +138,8 @@ evict_inode: | |||
135 | put_super: write | 138 | put_super: write |
136 | write_super: read | 139 | write_super: read |
137 | sync_fs: read | 140 | sync_fs: read |
138 | freeze_fs: read | 141 | freeze_fs: write |
139 | unfreeze_fs: read | 142 | unfreeze_fs: write |
140 | statfs: maybe(read) (see below) | 143 | statfs: maybe(read) (see below) |
141 | remount_fs: write | 144 | remount_fs: write |
142 | umount_begin: no | 145 | umount_begin: no |
@@ -203,6 +206,8 @@ prototypes: | |||
203 | int (*launder_page)(struct page *); | 206 | int (*launder_page)(struct page *); |
204 | int (*is_partially_uptodate)(struct page *, read_descriptor_t *, unsigned long); | 207 | int (*is_partially_uptodate)(struct page *, read_descriptor_t *, unsigned long); |
205 | int (*error_remove_page)(struct address_space *, struct page *); | 208 | int (*error_remove_page)(struct address_space *, struct page *); |
209 | int (*swap_activate)(struct file *); | ||
210 | int (*swap_deactivate)(struct file *); | ||
206 | 211 | ||
207 | locking rules: | 212 | locking rules: |
208 | All except set_page_dirty and freepage may block | 213 | All except set_page_dirty and freepage may block |
@@ -226,6 +231,8 @@ migratepage: yes (both) | |||
226 | launder_page: yes | 231 | launder_page: yes |
227 | is_partially_uptodate: yes | 232 | is_partially_uptodate: yes |
228 | error_remove_page: yes | 233 | error_remove_page: yes |
234 | swap_activate: no | ||
235 | swap_deactivate: no | ||
229 | 236 | ||
230 | ->write_begin(), ->write_end(), ->sync_page() and ->readpage() | 237 | ->write_begin(), ->write_end(), ->sync_page() and ->readpage() |
231 | may be called from the request handler (/dev/loop). | 238 | may be called from the request handler (/dev/loop). |
@@ -327,6 +334,15 @@ cleaned, or an error value if not. Note that in order to prevent the page | |||
327 | getting mapped back in and redirtied, it needs to be kept locked | 334 | getting mapped back in and redirtied, it needs to be kept locked |
328 | across the entire operation. | 335 | across the entire operation. |
329 | 336 | ||
337 | ->swap_activate will be called with a non-zero argument on | ||
338 | files backing (non block device backed) swapfiles. A return value | ||
339 | of zero indicates success, in which case this file can be used for | ||
340 | backing swapspace. The swapspace operations will be proxied to the | ||
341 | address space operations. | ||
342 | |||
343 | ->swap_deactivate() will be called in the sys_swapoff() | ||
344 | path after ->swap_activate() returned success. | ||
345 | |||
330 | ----------------------- file_lock_operations ------------------------------ | 346 | ----------------------- file_lock_operations ------------------------------ |
331 | prototypes: | 347 | prototypes: |
332 | void (*fl_copy_lock)(struct file_lock *, struct file_lock *); | 348 | void (*fl_copy_lock)(struct file_lock *, struct file_lock *); |
@@ -343,7 +359,6 @@ prototypes: | |||
343 | int (*lm_compare_owner)(struct file_lock *, struct file_lock *); | 359 | int (*lm_compare_owner)(struct file_lock *, struct file_lock *); |
344 | void (*lm_notify)(struct file_lock *); /* unblock callback */ | 360 | void (*lm_notify)(struct file_lock *); /* unblock callback */ |
345 | int (*lm_grant)(struct file_lock *, struct file_lock *, int); | 361 | int (*lm_grant)(struct file_lock *, struct file_lock *, int); |
346 | void (*lm_release_private)(struct file_lock *); | ||
347 | void (*lm_break)(struct file_lock *); /* break_lease callback */ | 362 | void (*lm_break)(struct file_lock *); /* break_lease callback */ |
348 | int (*lm_change)(struct file_lock **, int); | 363 | int (*lm_change)(struct file_lock **, int); |
349 | 364 | ||
@@ -352,7 +367,6 @@ locking rules: | |||
352 | lm_compare_owner: yes no | 367 | lm_compare_owner: yes no |
353 | lm_notify: yes no | 368 | lm_notify: yes no |
354 | lm_grant: no no | 369 | lm_grant: no no |
355 | lm_release_private: maybe no | ||
356 | lm_break: yes no | 370 | lm_break: yes no |
357 | lm_change yes no | 371 | lm_change yes no |
358 | 372 | ||