]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
crush: fix tree bucket functions
authorRongze Zhu <zrzhit@gmail.com>
Mon, 10 Nov 2014 16:13:42 +0000 (00:13 +0800)
committerSage Weil <sage@redhat.com>
Sat, 7 Feb 2015 20:33:22 +0000 (12:33 -0800)
commitca8471d65fb2cf7d2247d823c5436faa273efda5
tree8719f1ec8ee7db4658fe2122d847d392b9fceda1
parentaf502f25b04cd0758b753941ecf0b1b59d33ea9e
crush: fix tree bucket functions

There are incorrect nodes' weight in tree bucket when construct tree
bucket. The tree bucket don't store item id in items array, so the tree
bucket will not work correctly. The patch fix above bugs and add a
simple test for tree bucket.

Signed-off-by: Rongze Zhu <zrzhit@gmail.com>
(cherry picked from commit 13425488882d360fa740613dfcfd0d098c1b7616)
src/crush/builder.c
src/test/cli/crushtool/add-item-in-tree.t [new file with mode: 0644]
src/test/cli/crushtool/tree.template [new file with mode: 0644]
src/test/cli/crushtool/tree.template.final [new file with mode: 0644]