diff options
author | Miklos Szeredi <mszeredi@suse.cz> | 2014-10-23 18:14:35 -0400 |
---|---|---|
committer | Miklos Szeredi <mszeredi@suse.cz> | 2014-10-23 18:14:35 -0400 |
commit | 4aa7c6346be395bdf776f82bbb2e3e2bc60bdd2b (patch) | |
tree | a2135754a04370e7fcf7b867b0f4fbeaa58b3521 /Documentation | |
parent | f114040e3ea6e07372334ade75d1ee0775c355e1 (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/Locking | 2 | ||||
-rw-r--r-- | Documentation/filesystems/vfs.txt | 7 |
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 | ||
71 | locking rules: | 72 | locking rules: |
72 | all may block | 73 | all may block |
@@ -96,6 +97,7 @@ fiemap: no | |||
96 | update_time: no | 97 | update_time: no |
97 | atomic_open: yes | 98 | atomic_open: yes |
98 | tmpfile: no | 99 | tmpfile: no |
100 | dentry_open: no | ||
99 | 101 | ||
100 | Additionally, ->rmdir(), ->unlink() and ->rename() have ->i_mutex on | 102 | Additionally, ->rmdir(), ->unlink() and ->rename() have ->i_mutex on |
101 | victim. | 103 | victim. |
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 | ||
369 | Again, all methods are called without any locks being held, unless | 370 | Again, 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 |