Message ID | 6AA21C22F0A5DA478922644AD2EC308C897ED0@SHSMSX101.ccr.corp.intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Any chance you can submit this as a pull request? On Tue, Jul 29, 2014 at 11:12 PM, Ma, Jianpeng <jianpeng.ma@intel.com> wrote: > Signed-off-by: Ma Jianpeng <jianpeng.ma@intel.com> > --- > src/osd/ECBackend.h | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/src/osd/ECBackend.h b/src/osd/ECBackend.h > index 28bcf8a..0e96407 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()); > } > > /** > -- > 1.9.1 > -- > To unsubscribe from this list: send the line "unsubscribe ceph-devel" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/src/osd/ECBackend.h b/src/osd/ECBackend.h index 28bcf8a..0e96407 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()); } /**
Signed-off-by: Ma Jianpeng <jianpeng.ma@intel.com> --- src/osd/ECBackend.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html