aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorMiklos Szeredi <mszeredi@suse.cz>2014-10-23 18:14:35 -0400
committerMiklos Szeredi <mszeredi@suse.cz>2014-10-23 18:14:35 -0400
commit4aa7c6346be395bdf776f82bbb2e3e2bc60bdd2b (patch)
treea2135754a04370e7fcf7b867b0f4fbeaa58b3521 /Documentation
parentf114040e3ea6e07372334ade75d1ee0775c355e1 (diff)
vfs: add i_op->dentry_open()
Add a new inode operation i_op->dentry_open(). This is for stacked filesystems that want to return a struct file from a different filesystem. Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/filesystems/Locking2
-rw-r--r--Documentation/filesystems/vfs.txt7
2 files changed, 9 insertions, 0 deletions
diff --git a/Documentation/filesystems/Locking b/Documentation/filesystems/Locking
index 94d93b1f8b53..b30753cbf431 100644
--- a/Documentation/filesystems/Locking
+++ b/Documentation/filesystems/Locking
@@ -67,6 +67,7 @@ prototypes:
67 struct file *, unsigned open_flag, 67 struct file *, unsigned open_flag,
68 umode_t create_mode, int *opened); 68 umode_t create_mode, int *opened);
69 int (*tmpfile) (struct inode *, struct dentry *, umode_t); 69 int (*tmpfile) (struct inode *, struct dentry *, umode_t);
70 int (*dentry_open)(struct dentry *, struct file *, const struct cred *);
70 71
71locking rules: 72locking rules:
72 all may block 73 all may block
@@ -96,6 +97,7 @@ fiemap: no
96update_time: no 97update_time: no
97atomic_open: yes 98atomic_open: yes
98tmpfile: no 99tmpfile: no
100dentry_open: no
99 101
100 Additionally, ->rmdir(), ->unlink() and ->rename() have ->i_mutex on 102 Additionally, ->rmdir(), ->unlink() and ->rename() have ->i_mutex on
101victim. 103victim.
diff --git a/Documentation/filesystems/vfs.txt b/Documentation/filesystems/vfs.txt
index fceff7c00a3c..20bf204426ca 100644
--- a/Documentation/filesystems/vfs.txt
+++ b/Documentation/filesystems/vfs.txt
@@ -364,6 +364,7 @@ struct inode_operations {
364 int (*atomic_open)(struct inode *, struct dentry *, struct file *, 364 int (*atomic_open)(struct inode *, struct dentry *, struct file *,
365 unsigned open_flag, umode_t create_mode, int *opened); 365 unsigned open_flag, umode_t create_mode, int *opened);
366 int (*tmpfile) (struct inode *, struct dentry *, umode_t); 366 int (*tmpfile) (struct inode *, struct dentry *, umode_t);
367 int (*dentry_open)(struct dentry *, struct file *, const struct cred *);
367}; 368};
368 369
369Again, all methods are called without any locks being held, unless 370Again, all methods are called without any locks being held, unless
@@ -696,6 +697,12 @@ struct address_space_operations {
696 but instead uses bmap to find out where the blocks in the file 697 but instead uses bmap to find out where the blocks in the file
697 are and uses those addresses directly. 698 are and uses those addresses directly.
698 699
700 dentry_open: *WARNING: probably going away soon, do not use!* This is an
701 alternative to f_op->open(), the difference is that this method may open
702 a file not necessarily originating from the same filesystem as the one
703 i_op->open() was called on. It may be useful for stacking filesystems
704 which want to allow native I/O directly on underlying files.
705
699 706
700 invalidatepage: If a page has PagePrivate set, then invalidatepage 707 invalidatepage: If a page has PagePrivate set, then invalidatepage
701 will be called when part or all of the page is to be removed 708 will be called when part or all of the page is to be removed