From: Yan, Zheng Date: Mon, 23 Sep 2013 07:28:52 +0000 (+0800) Subject: fragtree_t: fix get_leaves_under() X-Git-Tag: v0.72-rc1~39^2~7 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c7db090b2a470052d450b363b9e76c36376dc11f;p=ceph.git fragtree_t: fix get_leaves_under() If fragtree is (*^1, 1*^1) and we want leaves under frag 000*. get_leaves_under() return frag 0*, frag 10* and frag 11*. This is obviously wrong. Signed-off-by: Yan, Zheng --- diff --git a/src/include/frag.h b/src/include/frag.h index 715eb0982839..fbe5b43f8cbe 100644 --- a/src/include/frag.h +++ b/src/include/frag.h @@ -285,7 +285,7 @@ public: */ void get_leaves_under(frag_t x, std::list& ls) const { std::list q; - q.push_back(get_branch(x)); + q.push_back(get_branch_or_leaf(x)); while (!q.empty()) { frag_t t = q.front(); q.pop_front();