]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
crush: fix class_is_in_use()
authorxie xingguo <xie.xingguo@zte.com.cn>
Fri, 14 Jul 2017 11:43:26 +0000 (19:43 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Wed, 26 Jul 2017 14:31:39 +0000 (22:31 +0800)
commite4e83a0dd74d25eefd5e12c70d9ab247d9f70703
tree3d568502b30c8d85b27906ce4af082b14ea4c7c5
parentf3a3180ccadea78d3ebf0353df50f74b5222e14e
crush: fix class_is_in_use()

A class can be considered as in-use only if it is referenced by
any of the existing crush rules.

The patch also makes the output more human readable. For example:

./bin/ceph osd crush rule create-replicated myrule default host ssd
./bin/ceph osd crush class rm ssd
Error EBUSY: class 'ssd' still referenced by crush_rule 'myrule'

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
qa/standalone/crush/crush-classes.sh
src/crush/CrushWrapper.cc
src/crush/CrushWrapper.h
src/mon/OSDMonitor.cc