diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-16 14:31:50 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-16 14:31:50 -0500 |
commit | f8206b925fb0eba3a11839419be118b09105d7b1 (patch) | |
tree | 5d41b356a043da09c816ed80bd79d1ea8b2b47e5 /Documentation/filesystems | |
parent | 1b59be2a6cdcb5a12e18d8315c07c94a624de48f (diff) | |
parent | f03c65993b98eeb909a4012ce7833c5857d74755 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6: (23 commits)
sanitize vfsmount refcounting changes
fix old umount_tree() breakage
autofs4: Merge the remaining dentry ops tables
Unexport do_add_mount() and add in follow_automount(), not ->d_automount()
Allow d_manage() to be used in RCU-walk mode
Remove a further kludge from __do_follow_link()
autofs4: Bump version
autofs4: Add v4 pseudo direct mount support
autofs4: Fix wait validation
autofs4: Clean up autofs4_free_ino()
autofs4: Clean up dentry operations
autofs4: Clean up inode operations
autofs4: Remove unused code
autofs4: Add d_manage() dentry operation
autofs4: Add d_automount() dentry operation
Remove the automount through follow_link() kludge code from pathwalk
CIFS: Use d_automount() rather than abusing follow_link()
NFS: Use d_automount() rather than abusing follow_link()
AFS: Use d_automount() rather than abusing follow_link()
Add an AT_NO_AUTOMOUNT flag to suppress terminal automount
...
Diffstat (limited to 'Documentation/filesystems')
-rw-r--r-- | Documentation/filesystems/Locking | 4 | ||||
-rw-r--r-- | Documentation/filesystems/vfs.txt | 43 |
2 files changed, 47 insertions, 0 deletions
diff --git a/Documentation/filesystems/Locking b/Documentation/filesystems/Locking index ef9349a4b5d1..651d5237c155 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: |
diff --git a/Documentation/filesystems/vfs.txt b/Documentation/filesystems/vfs.txt index cae6d27c9f5b..94cf97b901d7 100644 --- a/Documentation/filesystems/vfs.txt +++ b/Documentation/filesystems/vfs.txt | |||
@@ -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) |