From: songweibin Date: Thu, 8 Mar 2018 02:29:22 +0000 (+0800) Subject: rbd: pool_percent_used should not divided by 100 X-Git-Tag: v13.0.2~43^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F20795%2Fhead;p=ceph.git rbd: pool_percent_used should not divided by 100 The value of 'percent_used' in `ceph df --format=json` has already been divided by 100. Signed-off-by: songweibin --- diff --git a/src/tools/rbd/action/Trash.cc b/src/tools/rbd/action/Trash.cc index b1ad5ade30e7..ef0355ac5777 100644 --- a/src/tools/rbd/action/Trash.cc +++ b/src/tools/rbd/action/Trash.cc @@ -421,7 +421,7 @@ int execute_purge (const po::variables_map &vm, for(uint8_t i = 0; i < arr.size(); ++i) { if(arr[i].get_obj()["name"] == pool_name) { json_spirit::mObject stats = arr[i].get_obj()["stats"].get_obj(); - pool_percent_used = stats["percent_used"].get_real() / 100; + pool_percent_used = stats["percent_used"].get_real(); if(pool_percent_used <= threshold) { std::cout << "rbd: pool usage is lower than or equal to " << (threshold*100)