]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
cls/cmpomap: add cls module for CMPXATTR-like functionality in omap
authorCasey Bodley <cbodley@redhat.com>
Fri, 13 Mar 2020 20:09:50 +0000 (16:09 -0400)
committerCasey Bodley <cbodley@redhat.com>
Mon, 13 Apr 2020 13:23:44 +0000 (09:23 -0400)
commit3d5c8e982e1441fa48159c49fd4c847de95cf6fa
tree975702cacbb9b10efd297afdf795e0b9f627d3c0
parent68b02d951003df838a2cf5be9547f51c18b5be04
cls/cmpomap: add cls module for CMPXATTR-like functionality in omap

provides a cmp_vals() op similar to librados' omap_cmp(), but with full
support for the comparison modes and operations from cmpxattr(). if any
of the requested key/value comparisons are unsuccessful, the op fails
with -ECANCELED

cmp_vals() can be composed with other ops like set_omap_vals() to make
make them conditional on the successful comparison of all existing values

also provides cmp_set_vals() and cmp_rm_keys(), which apply a mutation
to only the keys that compare successfully. these enable batch
operations where, unlike cmp_vals() + set_omap_vals(), you don't want
one failed comparison to prevent operations on unrelated keys

Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/cls/CMakeLists.txt
src/cls/cmpomap/CMakeLists.txt [new file with mode: 0644]
src/cls/cmpomap/client.cc [new file with mode: 0644]
src/cls/cmpomap/client.h [new file with mode: 0644]
src/cls/cmpomap/ops.h [new file with mode: 0644]
src/cls/cmpomap/server.cc [new file with mode: 0644]
src/cls/cmpomap/types.h [new file with mode: 0644]
src/osd/CMakeLists.txt