diff options
author | David S. Miller <davem@davemloft.net> | 2011-01-24 16:17:06 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-01-24 16:17:06 -0500 |
commit | e92427b289d252cfbd4cb5282d92f4ce1a5bb1fb (patch) | |
tree | 6d30e5e7b7f8e9aaa51d43b7128ac56860fa03bb /Documentation/filesystems | |
parent | c506653d35249bb4738bb139c24362e1ae724bc1 (diff) | |
parent | ec30f343d61391ab23705e50a525da1d55395780 (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'Documentation/filesystems')
-rw-r--r-- | Documentation/filesystems/Locking | 9 | ||||
-rw-r--r-- | Documentation/filesystems/ntfs.txt | 3 | ||||
-rw-r--r-- | Documentation/filesystems/porting | 17 | ||||
-rw-r--r-- | Documentation/filesystems/proc.txt | 7 | ||||
-rw-r--r-- | Documentation/filesystems/vfs.txt | 47 |
5 files changed, 73 insertions, 10 deletions
diff --git a/Documentation/filesystems/Locking b/Documentation/filesystems/Locking index 977d8919cc69..4471a416c274 100644 --- a/Documentation/filesystems/Locking +++ b/Documentation/filesystems/Locking | |||
@@ -19,6 +19,8 @@ prototypes: | |||
19 | void (*d_release)(struct dentry *); | 19 | void (*d_release)(struct dentry *); |
20 | void (*d_iput)(struct dentry *, struct inode *); | 20 | void (*d_iput)(struct dentry *, struct inode *); |
21 | char *(*d_dname)((struct dentry *dentry, char *buffer, int buflen); | 21 | char *(*d_dname)((struct dentry *dentry, char *buffer, int buflen); |
22 | struct vfsmount *(*d_automount)(struct path *path); | ||
23 | int (*d_manage)(struct dentry *, bool); | ||
22 | 24 | ||
23 | locking rules: | 25 | locking rules: |
24 | rename_lock ->d_lock may block rcu-walk | 26 | rename_lock ->d_lock may block rcu-walk |
@@ -29,6 +31,8 @@ d_delete: no yes no no | |||
29 | d_release: no no yes no | 31 | d_release: no no yes no |
30 | d_iput: no no yes no | 32 | d_iput: no no yes no |
31 | d_dname: no no no no | 33 | d_dname: no no no no |
34 | d_automount: no no yes no | ||
35 | d_manage: no no yes (ref-walk) maybe | ||
32 | 36 | ||
33 | --------------------------- inode_operations --------------------------- | 37 | --------------------------- inode_operations --------------------------- |
34 | prototypes: | 38 | prototypes: |
@@ -56,7 +60,6 @@ ata *); | |||
56 | ssize_t (*listxattr) (struct dentry *, char *, size_t); | 60 | ssize_t (*listxattr) (struct dentry *, char *, size_t); |
57 | int (*removexattr) (struct dentry *, const char *); | 61 | int (*removexattr) (struct dentry *, const char *); |
58 | void (*truncate_range)(struct inode *, loff_t, loff_t); | 62 | void (*truncate_range)(struct inode *, loff_t, loff_t); |
59 | long (*fallocate)(struct inode *inode, int mode, loff_t offset, loff_t len); | ||
60 | int (*fiemap)(struct inode *, struct fiemap_extent_info *, u64 start, u64 len); | 63 | int (*fiemap)(struct inode *, struct fiemap_extent_info *, u64 start, u64 len); |
61 | 64 | ||
62 | locking rules: | 65 | locking rules: |
@@ -84,7 +87,6 @@ getxattr: no | |||
84 | listxattr: no | 87 | listxattr: no |
85 | removexattr: yes | 88 | removexattr: yes |
86 | truncate_range: yes | 89 | truncate_range: yes |
87 | fallocate: no | ||
88 | fiemap: no | 90 | fiemap: no |
89 | Additionally, ->rmdir(), ->unlink() and ->rename() have ->i_mutex on | 91 | Additionally, ->rmdir(), ->unlink() and ->rename() have ->i_mutex on |
90 | victim. | 92 | victim. |
@@ -343,7 +345,6 @@ prototypes: | |||
343 | int (*fl_grant)(struct file_lock *, struct file_lock *, int); | 345 | int (*fl_grant)(struct file_lock *, struct file_lock *, int); |
344 | void (*fl_release_private)(struct file_lock *); | 346 | void (*fl_release_private)(struct file_lock *); |
345 | void (*fl_break)(struct file_lock *); /* break_lease callback */ | 347 | void (*fl_break)(struct file_lock *); /* break_lease callback */ |
346 | int (*fl_mylease)(struct file_lock *, struct file_lock *); | ||
347 | int (*fl_change)(struct file_lock **, int); | 348 | int (*fl_change)(struct file_lock **, int); |
348 | 349 | ||
349 | locking rules: | 350 | locking rules: |
@@ -353,7 +354,6 @@ fl_notify: yes no | |||
353 | fl_grant: no no | 354 | fl_grant: no no |
354 | fl_release_private: maybe no | 355 | fl_release_private: maybe no |
355 | fl_break: yes no | 356 | fl_break: yes no |
356 | fl_mylease: yes no | ||
357 | fl_change yes no | 357 | fl_change yes no |
358 | 358 | ||
359 | --------------------------- buffer_head ----------------------------------- | 359 | --------------------------- buffer_head ----------------------------------- |
@@ -435,6 +435,7 @@ prototypes: | |||
435 | ssize_t (*splice_read)(struct file *, loff_t *, struct pipe_inode_info *, | 435 | ssize_t (*splice_read)(struct file *, loff_t *, struct pipe_inode_info *, |
436 | size_t, unsigned int); | 436 | size_t, unsigned int); |
437 | int (*setlease)(struct file *, long, struct file_lock **); | 437 | int (*setlease)(struct file *, long, struct file_lock **); |
438 | long (*fallocate)(struct file *, int, loff_t, loff_t); | ||
438 | }; | 439 | }; |
439 | 440 | ||
440 | locking rules: | 441 | locking rules: |
diff --git a/Documentation/filesystems/ntfs.txt b/Documentation/filesystems/ntfs.txt index ac2a261c5f7d..6ef8cf3bc9a3 100644 --- a/Documentation/filesystems/ntfs.txt +++ b/Documentation/filesystems/ntfs.txt | |||
@@ -457,6 +457,9 @@ ChangeLog | |||
457 | 457 | ||
458 | Note, a technical ChangeLog aimed at kernel hackers is in fs/ntfs/ChangeLog. | 458 | Note, a technical ChangeLog aimed at kernel hackers is in fs/ntfs/ChangeLog. |
459 | 459 | ||
460 | 2.1.30: | ||
461 | - Fix writev() (it kept writing the first segment over and over again | ||
462 | instead of moving onto subsequent segments). | ||
460 | 2.1.29: | 463 | 2.1.29: |
461 | - Fix a deadlock when mounting read-write. | 464 | - Fix a deadlock when mounting read-write. |
462 | 2.1.28: | 465 | 2.1.28: |
diff --git a/Documentation/filesystems/porting b/Documentation/filesystems/porting index 07a32b42cf9c..dfbcd1b00b0a 100644 --- a/Documentation/filesystems/porting +++ b/Documentation/filesystems/porting | |||
@@ -365,8 +365,8 @@ must be done in the RCU callback. | |||
365 | [recommended] | 365 | [recommended] |
366 | vfs now tries to do path walking in "rcu-walk mode", which avoids | 366 | vfs now tries to do path walking in "rcu-walk mode", which avoids |
367 | atomic operations and scalability hazards on dentries and inodes (see | 367 | atomic operations and scalability hazards on dentries and inodes (see |
368 | Documentation/filesystems/path-walk.txt). d_hash and d_compare changes (above) | 368 | Documentation/filesystems/path-lookup.txt). d_hash and d_compare changes |
369 | are examples of the changes required to support this. For more complex | 369 | (above) are examples of the changes required to support this. For more complex |
370 | filesystem callbacks, the vfs drops out of rcu-walk mode before the fs call, so | 370 | filesystem callbacks, the vfs drops out of rcu-walk mode before the fs call, so |
371 | no changes are required to the filesystem. However, this is costly and loses | 371 | no changes are required to the filesystem. However, this is costly and loses |
372 | the benefits of rcu-walk mode. We will begin to add filesystem callbacks that | 372 | the benefits of rcu-walk mode. We will begin to add filesystem callbacks that |
@@ -383,5 +383,14 @@ Documentation/filesystems/vfs.txt for more details. | |||
383 | 383 | ||
384 | permission and check_acl are inode permission checks that are called | 384 | permission and check_acl are inode permission checks that are called |
385 | on many or all directory inodes on the way down a path walk (to check for | 385 | on many or all directory inodes on the way down a path walk (to check for |
386 | exec permission). These must now be rcu-walk aware (flags & IPERM_RCU). See | 386 | exec permission). These must now be rcu-walk aware (flags & IPERM_FLAG_RCU). |
387 | Documentation/filesystems/vfs.txt for more details. | 387 | See Documentation/filesystems/vfs.txt for more details. |
388 | |||
389 | -- | ||
390 | [mandatory] | ||
391 | In ->fallocate() you must check the mode option passed in. If your | ||
392 | filesystem does not support hole punching (deallocating space in the middle of a | ||
393 | file) you must return -EOPNOTSUPP if FALLOC_FL_PUNCH_HOLE is set in mode. | ||
394 | Currently you can only have FALLOC_FL_PUNCH_HOLE with FALLOC_FL_KEEP_SIZE set, | ||
395 | so the i_size should not change when hole punching, even when puching the end of | ||
396 | a file off. | ||
diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt index 9471225212c4..23cae6548d3a 100644 --- a/Documentation/filesystems/proc.txt +++ b/Documentation/filesystems/proc.txt | |||
@@ -375,6 +375,7 @@ Anonymous: 0 kB | |||
375 | Swap: 0 kB | 375 | Swap: 0 kB |
376 | KernelPageSize: 4 kB | 376 | KernelPageSize: 4 kB |
377 | MMUPageSize: 4 kB | 377 | MMUPageSize: 4 kB |
378 | Locked: 374 kB | ||
378 | 379 | ||
379 | The first of these lines shows the same information as is displayed for the | 380 | The first of these lines shows the same information as is displayed for the |
380 | mapping in /proc/PID/maps. The remaining lines show the size of the mapping | 381 | mapping in /proc/PID/maps. The remaining lines show the size of the mapping |
@@ -670,6 +671,8 @@ varies by architecture and compile options. The following is from a | |||
670 | 671 | ||
671 | > cat /proc/meminfo | 672 | > cat /proc/meminfo |
672 | 673 | ||
674 | The "Locked" indicates whether the mapping is locked in memory or not. | ||
675 | |||
673 | 676 | ||
674 | MemTotal: 16344972 kB | 677 | MemTotal: 16344972 kB |
675 | MemFree: 13634064 kB | 678 | MemFree: 13634064 kB |
@@ -1320,6 +1323,10 @@ scaled linearly with /proc/<pid>/oom_score_adj. | |||
1320 | Writing to /proc/<pid>/oom_score_adj or /proc/<pid>/oom_adj will change the | 1323 | Writing to /proc/<pid>/oom_score_adj or /proc/<pid>/oom_adj will change the |
1321 | other with its scaled value. | 1324 | other with its scaled value. |
1322 | 1325 | ||
1326 | The value of /proc/<pid>/oom_score_adj may be reduced no lower than the last | ||
1327 | value set by a CAP_SYS_RESOURCE process. To reduce the value any lower | ||
1328 | requires CAP_SYS_RESOURCE. | ||
1329 | |||
1323 | NOTICE: /proc/<pid>/oom_adj is deprecated and will be removed, please see | 1330 | NOTICE: /proc/<pid>/oom_adj is deprecated and will be removed, please see |
1324 | Documentation/feature-removal-schedule.txt. | 1331 | Documentation/feature-removal-schedule.txt. |
1325 | 1332 | ||
diff --git a/Documentation/filesystems/vfs.txt b/Documentation/filesystems/vfs.txt index fbb324e2bd43..94cf97b901d7 100644 --- a/Documentation/filesystems/vfs.txt +++ b/Documentation/filesystems/vfs.txt | |||
@@ -415,8 +415,8 @@ otherwise noted. | |||
415 | permission: called by the VFS to check for access rights on a POSIX-like | 415 | permission: called by the VFS to check for access rights on a POSIX-like |
416 | filesystem. | 416 | filesystem. |
417 | 417 | ||
418 | May be called in rcu-walk mode (flags & IPERM_RCU). If in rcu-walk | 418 | May be called in rcu-walk mode (flags & IPERM_FLAG_RCU). If in rcu-walk |
419 | mode, the filesystem must check the permission without blocking or | 419 | mode, the filesystem must check the permission without blocking or |
420 | storing to the inode. | 420 | storing to the inode. |
421 | 421 | ||
422 | If a situation is encountered that rcu-walk cannot handle, return | 422 | If a situation is encountered that rcu-walk cannot handle, return |
@@ -864,6 +864,8 @@ struct dentry_operations { | |||
864 | void (*d_release)(struct dentry *); | 864 | void (*d_release)(struct dentry *); |
865 | void (*d_iput)(struct dentry *, struct inode *); | 865 | void (*d_iput)(struct dentry *, struct inode *); |
866 | char *(*d_dname)(struct dentry *, char *, int); | 866 | char *(*d_dname)(struct dentry *, char *, int); |
867 | struct vfsmount *(*d_automount)(struct path *); | ||
868 | int (*d_manage)(struct dentry *, bool, bool); | ||
867 | }; | 869 | }; |
868 | 870 | ||
869 | d_revalidate: called when the VFS needs to revalidate a dentry. This | 871 | d_revalidate: called when the VFS needs to revalidate a dentry. This |
@@ -930,6 +932,47 @@ struct dentry_operations { | |||
930 | at the end of the buffer, and returns a pointer to the first char. | 932 | at the end of the buffer, and returns a pointer to the first char. |
931 | dynamic_dname() helper function is provided to take care of this. | 933 | dynamic_dname() helper function is provided to take care of this. |
932 | 934 | ||
935 | d_automount: called when an automount dentry is to be traversed (optional). | ||
936 | This should create a new VFS mount record and return the record to the | ||
937 | caller. The caller is supplied with a path parameter giving the | ||
938 | automount directory to describe the automount target and the parent | ||
939 | VFS mount record to provide inheritable mount parameters. NULL should | ||
940 | be returned if someone else managed to make the automount first. If | ||
941 | the vfsmount creation failed, then an error code should be returned. | ||
942 | If -EISDIR is returned, then the directory will be treated as an | ||
943 | ordinary directory and returned to pathwalk to continue walking. | ||
944 | |||
945 | If a vfsmount is returned, the caller will attempt to mount it on the | ||
946 | mountpoint and will remove the vfsmount from its expiration list in | ||
947 | the case of failure. The vfsmount should be returned with 2 refs on | ||
948 | it to prevent automatic expiration - the caller will clean up the | ||
949 | additional ref. | ||
950 | |||
951 | This function is only used if DCACHE_NEED_AUTOMOUNT is set on the | ||
952 | dentry. This is set by __d_instantiate() if S_AUTOMOUNT is set on the | ||
953 | inode being added. | ||
954 | |||
955 | d_manage: called to allow the filesystem to manage the transition from a | ||
956 | dentry (optional). This allows autofs, for example, to hold up clients | ||
957 | waiting to explore behind a 'mountpoint' whilst letting the daemon go | ||
958 | past and construct the subtree there. 0 should be returned to let the | ||
959 | calling process continue. -EISDIR can be returned to tell pathwalk to | ||
960 | use this directory as an ordinary directory and to ignore anything | ||
961 | mounted on it and not to check the automount flag. Any other error | ||
962 | code will abort pathwalk completely. | ||
963 | |||
964 | If the 'mounting_here' parameter is true, then namespace_sem is being | ||
965 | held by the caller and the function should not initiate any mounts or | ||
966 | unmounts that it will then wait for. | ||
967 | |||
968 | If the 'rcu_walk' parameter is true, then the caller is doing a | ||
969 | pathwalk in RCU-walk mode. Sleeping is not permitted in this mode, | ||
970 | and the caller can be asked to leave it and call again by returing | ||
971 | -ECHILD. | ||
972 | |||
973 | This function is only used if DCACHE_MANAGE_TRANSIT is set on the | ||
974 | dentry being transited from. | ||
975 | |||
933 | Example : | 976 | Example : |
934 | 977 | ||
935 | static char *pipefs_dname(struct dentry *dent, char *buffer, int buflen) | 978 | static char *pipefs_dname(struct dentry *dent, char *buffer, int buflen) |