diff options
author | Sage Weil <sage@newdream.net> | 2010-11-16 11:14:34 -0800 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2011-01-12 15:15:12 -0800 |
commit | 6c0f3af72cb1622a66962a1180c36ef8c41be8e2 (patch) | |
tree | 66e415bf31ea31a3e9360c0ce624fd20b6050c89 /fs/ceph/inode.c | |
parent | 3c0eee3fe6a3a1c745379547c7e7c904aa64f6d5 (diff) | |
download | linux-3.10-6c0f3af72cb1622a66962a1180c36ef8c41be8e2.tar.gz linux-3.10-6c0f3af72cb1622a66962a1180c36ef8c41be8e2.tar.bz2 linux-3.10-6c0f3af72cb1622a66962a1180c36ef8c41be8e2.zip |
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/inode.c')
-rw-r--r-- | fs/ceph/inode.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c index bf1286588f2..045283ce441 100644 --- a/fs/ceph/inode.c +++ b/fs/ceph/inode.c @@ -297,6 +297,8 @@ struct inode *ceph_alloc_inode(struct super_block *sb) ci->i_release_count = 0; ci->i_symlink = NULL; + memset(&ci->i_dir_layout, 0, sizeof(ci->i_dir_layout)); + ci->i_fragtree = RB_ROOT; mutex_init(&ci->i_fragtree_mutex); |