]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crush: document return values
authorSage Weil <sage.weil@dreamhost.com>
Fri, 4 May 2012 03:28:27 +0000 (20:28 -0700)
committerSage Weil <sage.weil@dreamhost.com>
Fri, 4 May 2012 03:28:27 +0000 (20:28 -0700)
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
src/crush/CrushWrapper.h

index e9aa96f9db918392cd882e078277ac9d60f94afd..48d822281c8046b4ddf8e178385c3b2c1a7e9edd 100644 (file)
@@ -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;