]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
client: make seeky readdir more efficiency 14317/head
authorYan, Zheng <zyan@redhat.com>
Tue, 4 Apr 2017 12:45:05 +0000 (20:45 +0800)
committerYan, Zheng <zyan@redhat.com>
Tue, 18 Apr 2017 02:30:08 +0000 (10:30 +0800)
commit2b396cab22c9faaa7496000e77ec5f2d7e7d553d
tree86566fe057412572d3506f2c479c03eb7b807c1b
parent9f6492565895727892264efe0a4ee8013a8384c9
client: make seeky readdir more efficiency

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.

Fixes: http://tracker.ceph.com/issues/19306
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
src/client/Client.cc
src/include/ceph_fs.h
src/mds/Server.cc