]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
crush: fix incorrect use of adjust_item_weight method 2689/head
authorRongze Zhu <zrzhit@gmail.com>
Fri, 10 Oct 2014 11:18:00 +0000 (19:18 +0800)
committerRongze Zhu <zrzhit@gmail.com>
Mon, 10 Nov 2014 15:37:03 +0000 (23:37 +0800)
commit9850227d2f0ca2f692a154de2c14a0a08e751f08
tree8ba835697ae6b2cefcc6bfb804507e7b995acd5c
parent8be3446e86c1e24286477b7183d502a3d4ed7c31
crush: fix incorrect use of adjust_item_weight method

adjust_item_weight method will adjust all buckets which the item
inside. If the osd.0 in host=fake01 and host=fake02, we execute
"ceph osd crush osd.0 10 host=fake01", it not only will adjust fake01's
weight, but also will adjust fake02's weight.

the patch add adjust_item_weightf_in_loc method and fix remove_item,
_remove_item_under, update_item, insert_item, detach_bucket methods.

Signed-off-by: Rongze Zhu <zrzhit@gmail.com>
src/crush/CrushWrapper.cc
src/crush/CrushWrapper.h
src/test/cli/crushtool/adjust-item-weight.t [new file with mode: 0644]
src/test/cli/crushtool/simple.template.adj.one [new file with mode: 0644]
src/test/cli/crushtool/simple.template.adj.three [new file with mode: 0644]
src/test/cli/crushtool/simple.template.adj.two [new file with mode: 0644]
src/test/crush/TestCrushWrapper.cc