aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/filesystems
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/filesystems')
-rw-r--r--Documentation/filesystems/Locking4
-rw-r--r--Documentation/filesystems/vfs.txt43
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
23locking rules: 25locking 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
29d_release: no no yes no 31d_release: no no yes no
30d_iput: no no yes no 32d_iput: no no yes no
31d_dname: no no no no 33d_dname: no no no no
34d_automount: no no yes no
35d_manage: no no yes (ref-walk) maybe
32 36
33--------------------------- inode_operations --------------------------- 37--------------------------- inode_operations ---------------------------
34prototypes: 38prototypes:
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
933Example : 976Example :
934 977
935static char *pipefs_dname(struct dentry *dent, char *buffer, int buflen) 978static char *pipefs_dname(struct dentry *dent, char *buffer, int buflen)