]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
crush: safe check for 'ceph osd crush swap-bucket' 17335/head
authorCarudy <zhaoyang.han@easystack.cn>
Wed, 30 Aug 2017 02:06:54 +0000 (10:06 +0800)
committerHanzhaoyang <zhaoyang.han@easystack.cn>
Fri, 22 Sep 2017 05:29:23 +0000 (13:29 +0800)
commitad63d4ba2c3f343ef7f5b1df4b9c549084ea2750
tree5543404a8703d5698a14a9fad86172ba357fa640
parentbdaf63e2951e0d23440c19c3ab075e48cf65132b
crush: safe check for 'ceph osd crush swap-bucket'
The swap method is just swap the two buckets'weight,son and name.So there is a problem when we swap parent and children. When swap two buckets,one should not be ancestor of the other,or there will be a loop,which would destory the structure.

Signed-off-by: Carudy <zhaoyang.han@easystack.cn>
src/crush/CrushWrapper.cc
src/crush/CrushWrapper.h
src/test/crush/CrushWrapper.cc