]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mds/server: skip unwanted dn in handle_client_readdir 12870/head
authorXiaoxi Chen <xiaoxchen@ebay.com>
Wed, 11 Jan 2017 02:11:08 +0000 (19:11 -0700)
committerXiaoxi Chen <xiaoxchen@ebay.com>
Wed, 11 Jan 2017 03:04:56 +0000 (20:04 -0700)
commit52fe52baf920c672ac7f63a3087dcd31137891b6
treef8286b1ccf8e60211b5c059a7a9e97ff245d1ddf
parentfbad77c7275a94e746365764dfb7db3fcfb6642c
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>
src/mds/CDir.h
src/mds/Server.cc