Re: [PATCH]ECBackend: Using ROUND_UP_TO to refactor get_recovery_chunk_size()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Any chance you can submit this as a pull request?

On Tue, Jul 29, 2014 at 11:12 PM, Ma, Jianpeng <jianpeng.ma@xxxxxxxxx> wrote:
> Signed-off-by: Ma Jianpeng <jianpeng.ma@xxxxxxxxx>
> ---
>  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@xxxxxxxxxxxxxxx
> 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@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux