diff options
author | Sage Weil <sage@newdream.net> | 2010-11-16 14:14:34 -0500 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2011-01-12 18:15:12 -0500 |
commit | 6c0f3af72cb1622a66962a1180c36ef8c41be8e2 (patch) | |
tree | 66e415bf31ea31a3e9360c0ce624fd20b6050c89 /fs/ceph/super.h | |
parent | 3c0eee3fe6a3a1c745379547c7e7c904aa64f6d5 (diff) |
ceph: add dir_layout to inode
Add a ceph_dir_layout to the inode, and calculate dentry hash values based
on the parent directory's specified dir_hash function. This is needed
because the old default Linux dcache hash function is extremely week and
leads to a poor distribution of files among dir fragments.
Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs/ceph/super.h')
-rw-r--r-- | fs/ceph/super.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/ceph/super.h b/fs/ceph/super.h index 7f01728a4657..6e0826695112 100644 --- a/fs/ceph/super.h +++ b/fs/ceph/super.h | |||
@@ -239,6 +239,7 @@ struct ceph_inode_info { | |||
239 | unsigned i_ceph_flags; | 239 | unsigned i_ceph_flags; |
240 | unsigned long i_release_count; | 240 | unsigned long i_release_count; |
241 | 241 | ||
242 | struct ceph_dir_layout i_dir_layout; | ||
242 | struct ceph_file_layout i_layout; | 243 | struct ceph_file_layout i_layout; |
243 | char *i_symlink; | 244 | char *i_symlink; |
244 | 245 | ||
@@ -768,6 +769,7 @@ extern void ceph_dentry_lru_add(struct dentry *dn); | |||
768 | extern void ceph_dentry_lru_touch(struct dentry *dn); | 769 | extern void ceph_dentry_lru_touch(struct dentry *dn); |
769 | extern void ceph_dentry_lru_del(struct dentry *dn); | 770 | extern void ceph_dentry_lru_del(struct dentry *dn); |
770 | extern void ceph_invalidate_dentry_lease(struct dentry *dentry); | 771 | extern void ceph_invalidate_dentry_lease(struct dentry *dentry); |
772 | extern unsigned ceph_dentry_hash(struct dentry *dn); | ||
771 | 773 | ||
772 | /* | 774 | /* |
773 | * our d_ops vary depending on whether the inode is live, | 775 | * our d_ops vary depending on whether the inode is live, |