aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/dcache.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/dcache.h')
-rw-r--r--include/linux/dcache.h21
1 files changed, 14 insertions, 7 deletions
diff --git a/include/linux/dcache.h b/include/linux/dcache.h
index a37359d0bad1..c66d22487bf8 100644
--- a/include/linux/dcache.h
+++ b/include/linux/dcache.h
@@ -75,14 +75,22 @@ full_name_hash(const unsigned char *name, unsigned int len)
75 return end_name_hash(hash); 75 return end_name_hash(hash);
76} 76}
77 77
78struct dcookie_struct; 78/*
79 79 * Try to keep struct dentry aligned on 64 byte cachelines (this will
80#define DNAME_INLINE_LEN_MIN 36 80 * give reasonable cacheline footprint with larger lines without the
81 * large memory footprint increase).
82 */
83#ifdef CONFIG_64BIT
84#define DNAME_INLINE_LEN_MIN 32 /* 192 bytes */
85#else
86#define DNAME_INLINE_LEN_MIN 40 /* 128 bytes */
87#endif
81 88
82struct dentry { 89struct dentry {
83 atomic_t d_count; 90 atomic_t d_count;
84 unsigned int d_flags; /* protected by d_lock */ 91 unsigned int d_flags; /* protected by d_lock */
85 spinlock_t d_lock; /* per dentry lock */ 92 spinlock_t d_lock; /* per dentry lock */
93 int d_mounted;
86 struct inode *d_inode; /* Where the name belongs to - NULL is 94 struct inode *d_inode; /* Where the name belongs to - NULL is
87 * negative */ 95 * negative */
88 /* 96 /*
@@ -107,10 +115,7 @@ struct dentry {
107 struct dentry_operations *d_op; 115 struct dentry_operations *d_op;
108 struct super_block *d_sb; /* The root of the dentry tree */ 116 struct super_block *d_sb; /* The root of the dentry tree */
109 void *d_fsdata; /* fs-specific data */ 117 void *d_fsdata; /* fs-specific data */
110#ifdef CONFIG_PROFILING 118
111 struct dcookie_struct *d_cookie; /* cookie, if any */
112#endif
113 int d_mounted;
114 unsigned char d_iname[DNAME_INLINE_LEN_MIN]; /* small names */ 119 unsigned char d_iname[DNAME_INLINE_LEN_MIN]; /* small names */
115}; 120};
116 121
@@ -177,6 +182,8 @@ d_iput: no no no yes
177 182
178#define DCACHE_INOTIFY_PARENT_WATCHED 0x0020 /* Parent inode is watched */ 183#define DCACHE_INOTIFY_PARENT_WATCHED 0x0020 /* Parent inode is watched */
179 184
185#define DCACHE_COOKIE 0x0040 /* For use by dcookie subsystem */
186
180extern spinlock_t dcache_lock; 187extern spinlock_t dcache_lock;
181extern seqlock_t rename_lock; 188extern seqlock_t rename_lock;
182 189