]> git.baikalelectronics.ru Git - kernel.git/commit
ceph: make seeky readdir more efficient
authorYan, Zheng <zyan@redhat.com>
Wed, 5 Apr 2017 16:54:05 +0000 (12:54 -0400)
committerIlya Dryomov <idryomov@gmail.com>
Thu, 4 May 2017 07:19:20 +0000 (09:19 +0200)
commitee755893eabc35661f3c4ff0f03c42d7ab7fc384
tree2af22d86df9675d23fd500fc089f512ab958cabb
parent1482a82e11df0961424dd87dbccc1a85be13db41
ceph: make seeky readdir more efficient

Current cephfs client uses string to indicate start position of
readdir. The string is last entry of previous readdir reply.
This approach does not work for seeky readdir because we can
not easily convert the new postion to a string. For seeky readdir,
mds needs to return dentries from the beginning. Client keeps
retrying if the reply does not contain the dentry it wants.

In current version of ceph, mds sorts CDentry in its cache in
hash order. Client also uses dentry hash to compose dir postion.
For seeky readdir, if client passes the hash part of dir postion
to mds. mds can avoid replying useless dentries.

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
fs/ceph/dir.c
fs/ceph/inode.c
fs/ceph/mds_client.c
fs/ceph/mds_client.h
include/linux/ceph/ceph_fs.h