diff options
author | Sage Weil <sage.weil@dreamhost.com> | 2012-05-03 20:28:27 -0700 |
---|---|---|
committer | Sage Weil <sage.weil@dreamhost.com> | 2012-05-03 20:28:27 -0700 |
commit | 9772d132181c1bdef3559ed19a92f210465a1919 (patch) | |
tree | 51dccdef0191938188492a23f0eee675f8a8e19d | |
parent | 1cd6f764206bddac840935a3c7bb657e18359c62 (diff) | |
download | ceph-9772d132181c1bdef3559ed19a92f210465a1919.tar.gz |
crush: document return values
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
-rw-r--r-- | src/crush/CrushWrapper.h | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/crush/CrushWrapper.h b/src/crush/CrushWrapper.h index e9aa96f9db9..48d822281c8 100644 --- a/src/crush/CrushWrapper.h +++ b/src/crush/CrushWrapper.h @@ -193,6 +193,7 @@ public: * @param weight item weight * @param name item name * @param loc location (map of type to bucket names) + * @return 0 for success, negative on error */ int insert_item(CephContext *cct, int id, float weight, string name, map<string,string>& loc); @@ -207,6 +208,7 @@ public: * @param weight item weight * @param name item name * @param loc location (map of type to bucket names) + * @return 0 for no change, 1 for successful change, negative on error */ int update_item(CephContext *cct, int id, float weight, string name, map<string,string>& loc); @@ -215,6 +217,7 @@ public: * * @param cct cct * @param id item id to remove + * @return 0 on success, negative on error */ int remove_item(CephContext *cct, int id); int adjust_item_weight(CephContext *cct, int id, int weight); @@ -223,12 +226,6 @@ public: } void reweight(CephContext *cct); - static float quantize_weight(float weight) { - int w = (int)(weight * (float)0x10000); - return (float)w / (float)0x10000; - } - - /*** devices ***/ int get_max_devices() const { if (!crush) return 0; |