]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
cls/cmpomap: empty values are 0 in U64 comparisons 42908/head
authorCasey Bodley <cbodley@redhat.com>
Tue, 10 Aug 2021 19:40:25 +0000 (15:40 -0400)
committerCory Snyder <csnyder@iland.com>
Tue, 24 Aug 2021 16:48:07 +0000 (12:48 -0400)
commit01e4c1f3f96949d8ed55de9c49c138e3d8f1d808
tree5e9e7f8f2a14398694e89386483744a9484d0a8a
parent7282d81d2c500b5b0e929c07971b72444c6ac424
cls/cmpomap: empty values are 0 in U64 comparisons

previously, when trying to use cmpomap interfaces on an omap key with
an empty value, U64 comparisons would fail to decode with -EIO. so
cmp_set_vals() and cmp_rm_keys() are unable to update or remove such
keys

for backward-compatibility with rgw's data sync error repo, where the
keys used to have empty values, enable these comparisons by treating an
empty value as 0

Fixes: https://tracker.ceph.com/issues/52128
Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 23339590ca693c6577eb6de3b47103d60ff57a8b)
src/cls/cmpomap/client.h
src/cls/cmpomap/server.cc
src/test/cls_cmpomap/test_cls_cmpomap.cc