summaryrefslogtreecommitdiffstats
path: root/Documentation/filesystems/vfs.txt
diff options
context:
space:
mode:
authorMiklos Szeredi2016-06-30 08:53:27 +0200
committerMiklos Szeredi2016-06-30 08:53:27 +0200
commite698b8a43659f9ece192fcab215abcadac8f88d7 (patch)
tree73bcdb2ecc6a7fe314d380ac2373ff53d5f935ae /Documentation/filesystems/vfs.txt
parentvfs: merge .d_select_inode() into .d_real() (diff)
downloadkernel-qcow2-linux-e698b8a43659f9ece192fcab215abcadac8f88d7.tar.gz
kernel-qcow2-linux-e698b8a43659f9ece192fcab215abcadac8f88d7.tar.xz
kernel-qcow2-linux-e698b8a43659f9ece192fcab215abcadac8f88d7.zip
vfs: document ->d_real()
Add missing documentation for the d_op->d_real() method and d_real() helper. Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'Documentation/filesystems/vfs.txt')
-rw-r--r--Documentation/filesystems/vfs.txt20
1 files changed, 20 insertions, 0 deletions
diff --git a/Documentation/filesystems/vfs.txt b/Documentation/filesystems/vfs.txt
index c61a223ef3ff..1c934dd2c47d 100644
--- a/Documentation/filesystems/vfs.txt
+++ b/Documentation/filesystems/vfs.txt
@@ -938,6 +938,8 @@ struct dentry_operations {
char *(*d_dname)(struct dentry *, char *, int);
struct vfsmount *(*d_automount)(struct path *);
int (*d_manage)(struct dentry *, bool);
+ struct dentry *(*d_real)(struct dentry *, const struct inode *,
+ unsigned int);
};
d_revalidate: called when the VFS needs to revalidate a dentry. This
@@ -1060,6 +1062,24 @@ struct dentry_operations {
This function is only used if DCACHE_MANAGE_TRANSIT is set on the
dentry being transited from.
+ d_real: overlay/union type filesystems implement this method to return one of
+ the underlying dentries hidden by the overlay. It is used in three
+ different modes:
+
+ Called from open it may need to copy-up the file depending on the
+ supplied open flags. This mode is selected with a non-zero flags
+ argument. In this mode the d_real method can return an error.
+
+ Called from file_dentry() it returns the real dentry matching the inode
+ argument. The real dentry may be from a lower layer already copied up,
+ but still referenced from the file. This mode is selected with a
+ non-NULL inode argument. This will always succeed.
+
+ With NULL inode and zero flags the topmost real underlying dentry is
+ returned. This will always succeed.
+
+ This method is never called with both non-NULL inode and non-zero flags.
+
Example :
static char *pipefs_dname(struct dentry *dent, char *buffer, int buflen)