Re: [PATCH] rbd: interlock object-map/fast-diff features together

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

 



Thanks for the contribution. If possible, can you please submit this
as a pull request against the Ceph github repo [1]?

[1] http://github.com/ceph/ceph

On Fri, May 11, 2018 at 8:56 AM, Mao Zhongyi <maozy.fnst@xxxxxxxxxxxxxx> wrote:
> From: Mao Zhongyi <maozy.fnst@xxxxxxxxxxxxx>
>
> Since we only support Jewel and later releases, which both support
> object-map and fast-diff, enabling/disabling object-map should always
> enable/disable fast-diff.
>
> Reported-by: Jason Dillaman <dillaman@xxxxxxxxxx>
> Fixes: https://tracker.ceph.com/issues/24065
> Signed-off-by: Mao Zhongyi <maozy.fnst@xxxxxxxxxxxxxx>
> ---
>  src/librbd/Operations.cc | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/src/librbd/Operations.cc b/src/librbd/Operations.cc
> index 0e3ba2a..4a9ebfd 100644
> --- a/src/librbd/Operations.cc
> +++ b/src/librbd/Operations.cc
> @@ -1318,6 +1318,10 @@ int Operations<I>::update_features(uint64_t features, bool enabled) {
>      lderr(cct) << "cannot update immutable features" << dendl;
>      return -EINVAL;
>    }
> +  if ((features & RBD_FEATURE_FAST_DIFF) == RBD_FEATURE_FAST_DIFF ||
> +      (features & RBD_FEATURE_OBJECT_MAP) == RBD_FEATURE_OBJECT_MAP) {
> +         features = features | RBD_FEATURE_FAST_DIFF | RBD_FEATURE_OBJECT_MAP;
> +  }
>    if (features == 0) {
>      lderr(cct) << "update requires at least one feature" << dendl;
>      return -EINVAL;
> --
> 2.9.4
>
>
>



-- 
Jason
--
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