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>
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
|
||||
#include <linux/ceph/types.h>
|
||||
#include <linux/module.h>
|
||||
|
||||
/*
|
||||
* Robert Jenkin's hash function.
|
||||
@@ -104,6 +105,7 @@ unsigned ceph_str_hash(int type, const char *s, unsigned len)
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL(ceph_str_hash);
|
||||
|
||||
const char *ceph_str_hash_name(int type)
|
||||
{
|
||||
@@ -116,3 +118,4 @@ const char *ceph_str_hash_name(int type)
|
||||
return "unknown";
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL(ceph_str_hash_name);
|
||||
|
Reference in New Issue
Block a user