]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mds/server: skip unwanted dn in handle_client_readdir 13028/head
authorXiaoxi Chen <xiaoxchen@ebay.com>
Wed, 11 Jan 2017 02:11:08 +0000 (19:11 -0700)
committerNathan Cutler <ncutler@suse.com>
Fri, 20 Jan 2017 17:03:15 +0000 (18:03 +0100)
commit8b7996469652d01143806e1e815894afde3f426b
tree73ef5a41b2697bb33d0462f1b54794052fb30613
parentf223e27eeb35991352ebc1f67423d4ebc252adb7
mds/server: skip unwanted dn in handle_client_readdir

We can skip unwanted dn which  < (offset_key, snap) via map.lower_bound, rather than
iterate across them.

Previously we iterate and skip dn which < (offset_key, dn->last), as dn->last >= snap
 means (offset_key, dn->last) >= (offset_key, snap), and such iterate_and_skip logic
still keep, so this commit doesnt change code logic but an optimization.

Signed-off-by: Xiaoxi Chen <xiaoxchen@ebay.com>
(cherry picked from commit 52fe52baf920c672ac7f63a3087dcd31137891b6)
src/mds/CDir.h
src/mds/Server.cc