summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYan, Zheng <zheng.z.yan@intel.com>2013-09-23 15:28:52 +0800
committerYan, Zheng <zheng.z.yan@intel.com>2013-10-05 11:31:12 +0800
commitc7db090b2a470052d450b363b9e76c36376dc11f (patch)
tree9b53593edd68eae4b1c5acce5ddf746e87bd4e71
parentc40c5dc68d02fe691a5d2ef99f1d810b717d54d5 (diff)
downloadceph-c7db090b2a470052d450b363b9e76c36376dc11f.tar.gz
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 <zheng.z.yan@intel.com>
-rw-r--r--src/include/frag.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/include/frag.h b/src/include/frag.h
index 715eb098283..fbe5b43f8cb 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<frag_t>& ls) const {
std::list<frag_t> 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();