]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
cls/cmpomap: empty values are 0 in U64 comparisons 42740/head
authorCasey Bodley <cbodley@redhat.com>
Tue, 10 Aug 2021 19:40:25 +0000 (15:40 -0400)
committerCasey Bodley <cbodley@redhat.com>
Wed, 11 Aug 2021 13:36:19 +0000 (09:36 -0400)
commit23339590ca693c6577eb6de3b47103d60ff57a8b
tree706bcc49591e32be287d87b971b7604688818307
parent1fd64a3537ffaa43e7c5c30597aebeac00cf2abf
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>
src/cls/cmpomap/client.h
src/cls/cmpomap/server.cc
src/test/cls_cmpomap/test_cls_cmpomap.cc