]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
crush: add CrushWrapper::rename_item and can_rename_item
authorLoic Dachary <loic-201408@dachary.org>
Thu, 16 Oct 2014 00:06:12 +0000 (17:06 -0700)
committerLoic Dachary <loic-201408@dachary.org>
Thu, 16 Oct 2014 00:12:36 +0000 (17:12 -0700)
commit5e2a82675eb50f2e9f0fd8f27fb0e5fed6c97688
tree5b1a3bef0dcf6777bb9ec673c60ed99a66e26e49
parent236895eea65f8706baa5fdef96fb00ad5b82218c
crush: add CrushWrapper::rename_item and can_rename_item

The can_rename_item is a const method checking if renaming an item could
succeed. If not it returns a unique -errno code and a human readable
message message.

Trying to rename a non existent item into an existent item returns
-EALREADY which can be treated as success if renaming is to be
idempotent.

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
src/crush/CrushWrapper.cc
src/crush/CrushWrapper.h