* @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);
* @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);
*
* @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);
}
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;