diff options
Diffstat (limited to 'Documentation/filesystems/vfs.txt')
-rw-r--r-- | Documentation/filesystems/vfs.txt | 43 |
1 files changed, 43 insertions, 0 deletions
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) |