mirror of
https://github.com/ceph/ceph
synced 2025-02-20 01:17:47 +00:00
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:
commit
52c2182fe8
@ -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());
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user