summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorYan, Zheng <zyan@redhat.com>2016-04-29 06:27:30 +0300
committerIlya Dryomov <idryomov@gmail.com>2016-05-26 02:15:36 +0300
commitf3c4ebe65ea149ec892f94474233cfebe9cbe299 (patch)
tree4a6aa1280fa6160d55935577792cd5d46e18f665 /include
parent076c40f18d10489e29c515bf5936952830df5e16 (diff)
downloadlinux-f3c4ebe65ea149ec892f94474233cfebe9cbe299.tar.xz
ceph: using hash value to compose dentry offset
If MDS sorts dentries in dirfrag in hash order, we use hash value to compose dentry offset. dentry offset is: (0xff << 52) | ((24 bits hash) << 28) | (the nth entry hash hash collision) This offset is stable across directory fragmentation. This alos means there is no need to reset readdir offset if directory get fragmented in the middle of readdir. Signed-off-by: Yan, Zheng <zyan@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/ceph/ceph_fs.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/ceph/ceph_fs.h b/include/linux/ceph/ceph_fs.h
index a811c5e98bfa..dfce616002ad 100644
--- a/include/linux/ceph/ceph_fs.h
+++ b/include/linux/ceph/ceph_fs.h
@@ -357,6 +357,7 @@ extern const char *ceph_mds_op_name(int op);
*/
#define CEPH_READDIR_FRAG_END (1<<0)
#define CEPH_READDIR_FRAG_COMPLETE (1<<8)
+#define CEPH_READDIR_HASH_ORDER (1<<9)
union ceph_mds_request_args {
struct {