]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
crush: use bucket_exists() for item sanity checks
authorxie xingguo <xie.xingguo@zte.com.cn>
Thu, 21 Apr 2016 05:56:31 +0000 (13:56 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Thu, 21 Apr 2016 07:49:07 +0000 (15:49 +0800)
commit3299b018af36a7f65c8024794d0e15688b6b62df
treeea04a8f76527759d2a936fa7b70a3e04be1140b7
parentec43eb209fa1818d07a6cb567d3c8b82088598a4
crush: use bucket_exists() for item sanity checks

This is because get_bucket() never returns 0 on error,
it always returns a non-zero value. So if you
assert(get_bucket(item)), you always get a postive answer.

Replace existence check for a specific item

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/crush/CrushWrapper.cc
src/crush/CrushWrapper.h