Merge pull request #2183 from majianpeng/master

ECBackend: Using ROUND_UP_TO to refactor function get_recovery_chunk_size()

Reviewed-by: Samuel Just <sam.just@inktank.com>
This commit is contained in:
Samuel Just 2014-08-01 13:31:08 -07:00
commit 52c2182fe8

View File

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