diff options
Diffstat (limited to '')
-rw-r--r-- | src/osd/PG.cc | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/src/osd/PG.cc b/src/osd/PG.cc index fa49038ed..245aa8d00 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -420,15 +420,7 @@ void PG::queue_recovery() dout(10) << "queue_recovery -- queuing" << dendl; recovery_queued = true; // Let cost per object be the average object size - auto num_bytes = static_cast<uint64_t>( - std::max<int64_t>( - 0, // ensure bytes is non-negative - info.stats.stats.sum.num_bytes)); - auto num_objects = static_cast<uint64_t>( - std::max<int64_t>( - 1, // ensure objects is non-negative and non-zero - info.stats.stats.sum.num_objects)); - uint64_t cost_per_object = std::max<uint64_t>(num_bytes / num_objects, 1); + uint64_t cost_per_object = get_average_object_size(); osd->queue_for_recovery( this, cost_per_object, recovery_state.get_recovery_op_priority() ); |