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