diff options
| author | David Howells <dhowells@redhat.com> | 2015-01-29 07:02:28 -0500 |
|---|---|---|
| committer | Al Viro <viro@zeniv.linux.org.uk> | 2015-02-22 11:38:38 -0500 |
| commit | df1a085af1f652a02238168c4f2b730c8c90dd4a (patch) | |
| tree | e9f269431a6ed4ec7a70de68cd9b62b0bcbe2dea /include/linux | |
| parent | e7f7d2253c05143ed76ddc5e11f4cf0a9b814a27 (diff) | |
VFS: Add a fallthrough flag for marking virtual dentries
Add a DCACHE_FALLTHRU flag to indicate that, in a layered filesystem, this is
a virtual dentry that covers another one in a lower layer that should be used
instead. This may be recorded on medium if directory integration is stored
there.
The flag can be set with d_set_fallthru() and tested with d_is_fallthru().
Original-author: Valerie Aurora <vaurora@redhat.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/dcache.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/dcache.h b/include/linux/dcache.h index 98d2a948a08e..728f5d31b5e6 100644 --- a/include/linux/dcache.h +++ b/include/linux/dcache.h | |||
| @@ -223,6 +223,7 @@ struct dentry_operations { | |||
| 223 | #define DCACHE_FILE_TYPE 0x00500000 /* Other file type (or fallthru to such) */ | 223 | #define DCACHE_FILE_TYPE 0x00500000 /* Other file type (or fallthru to such) */ |
| 224 | 224 | ||
| 225 | #define DCACHE_MAY_FREE 0x00800000 | 225 | #define DCACHE_MAY_FREE 0x00800000 |
| 226 | #define DCACHE_FALLTHRU 0x01000000 /* Fall through to lower layer */ | ||
| 226 | 227 | ||
| 227 | extern seqlock_t rename_lock; | 228 | extern seqlock_t rename_lock; |
| 228 | 229 | ||
| @@ -470,6 +471,14 @@ static inline bool d_is_positive(const struct dentry *dentry) | |||
| 470 | return !d_is_negative(dentry); | 471 | return !d_is_negative(dentry); |
| 471 | } | 472 | } |
| 472 | 473 | ||
| 474 | extern void d_set_fallthru(struct dentry *dentry); | ||
| 475 | |||
| 476 | static inline bool d_is_fallthru(const struct dentry *dentry) | ||
| 477 | { | ||
| 478 | return dentry->d_flags & DCACHE_FALLTHRU; | ||
| 479 | } | ||
| 480 | |||
| 481 | |||
| 473 | extern int sysctl_vfs_cache_pressure; | 482 | extern int sysctl_vfs_cache_pressure; |
| 474 | 483 | ||
| 475 | static inline unsigned long vfs_pressure_ratio(unsigned long val) | 484 | static inline unsigned long vfs_pressure_ratio(unsigned long val) |
