]> git.baikalelectronics.ru Git - kernel.git/commit
ceph: using hash value to compose dentry offset
authorYan, Zheng <zyan@redhat.com>
Fri, 29 Apr 2016 03:27:30 +0000 (11:27 +0800)
committerIlya Dryomov <idryomov@gmail.com>
Wed, 25 May 2016 23:15:36 +0000 (01:15 +0200)
commitf93494b818bd5ca91f8635c98aaf3431f6a186fb
tree4a6aa1280fa6160d55935577792cd5d46e18f665
parent12ebdef60a4f7afb91f2e9ad7733a818a19907a5
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>
fs/ceph/dir.c
fs/ceph/inode.c
fs/ceph/mds_client.c
fs/ceph/mds_client.h
fs/ceph/super.h
include/linux/ceph/ceph_fs.h