]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
client: using hash value to compose dentry offset
authorYan, Zheng <zyan@redhat.com>
Mon, 25 Apr 2016 07:31:27 +0000 (15:31 +0800)
committerGreg Farnum <gfarnum@redhat.com>
Sun, 12 Jun 2016 21:10:18 +0000 (14:10 -0700)
commit3fe5a09f3e7aa9fc89cd47a261785110c2bf38a2
tree18d2adb89e1dade98db22c2d1875a4c0dadd6cf4
parenta65b3ef30123e5d9d3199cf2f5dafd7d9ab8a755
client: 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.

Signed-off-by: Yan, Zheng <zyan@redhat.com>
(cherry picked from commit 680766ec131b95271e320f54dfe6d69ea8d4fbb3)

Signed-off-by: Greg Farnum <gfarnum@redhat.com
src/client/Client.cc
src/client/Client.h
src/include/ceph_fs.h
src/mds/Server.cc