From: Ma Jianpeng Date: Wed, 30 Jul 2014 03:38:37 +0000 (+0800) Subject: ECBackend: Using ROUND_UP_TO to refactor function get_recovery_chunk_size() X-Git-Tag: v0.85~115^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=92d0bbe1cb00bcb061c5485e8a82a39c150b8bfe;p=ceph.git ECBackend: Using ROUND_UP_TO to refactor function get_recovery_chunk_size() Signed-off-by: Ma Jianpeng --- diff --git a/src/osd/ECBackend.h b/src/osd/ECBackend.h index 28bcf8a50954..0e964070e499 100644 --- a/src/osd/ECBackend.h +++ b/src/osd/ECBackend.h @@ -149,10 +149,8 @@ public: private: friend struct ECRecoveryHandle; uint64_t get_recovery_chunk_size() const { - uint64_t max = cct->_conf->osd_recovery_max_chunk; - max -= max % sinfo.get_stripe_width(); - max += sinfo.get_stripe_width(); - return max; + return ROUND_UP_TO(cct->_conf->osd_recovery_max_chunk, + sinfo.get_stripe_width()); } /**