equal
deleted
inserted
replaced
73 while (len--) |
73 while (len--) |
74 hash = partial_name_hash(*name++, hash); |
74 hash = partial_name_hash(*name++, hash); |
75 return end_name_hash(hash); |
75 return end_name_hash(hash); |
76 } |
76 } |
77 |
77 |
78 struct 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 |
82 struct dentry { |
89 struct 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 /* |
89 * The next three fields are touched by __d_lookup. Place them here |
97 * The next three fields are touched by __d_lookup. Place them here |
90 * so they all fit in a cache line. |
98 * so they all fit in a cache line. |
105 struct list_head d_alias; /* inode alias list */ |
113 struct list_head d_alias; /* inode alias list */ |
106 unsigned long d_time; /* used by d_revalidate */ |
114 unsigned long d_time; /* used by d_revalidate */ |
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 |
117 /* |
122 /* |
118 * dentry->d_lock spinlock nesting subclasses: |
123 * dentry->d_lock spinlock nesting subclasses: |
175 #define DCACHE_REFERENCED 0x0008 /* Recently used, don't discard. */ |
180 #define DCACHE_REFERENCED 0x0008 /* Recently used, don't discard. */ |
176 #define DCACHE_UNHASHED 0x0010 |
181 #define DCACHE_UNHASHED 0x0010 |
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 |
180 extern spinlock_t dcache_lock; |
187 extern spinlock_t dcache_lock; |
181 extern seqlock_t rename_lock; |
188 extern seqlock_t rename_lock; |
182 |
189 |
183 /** |
190 /** |
184 * d_drop - drop a dentry |
191 * d_drop - drop a dentry |