]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
librados: add cmpext API
authorwangzhengyong <wangzhengyong@cmss.chinamobile.com>
Fri, 21 Apr 2017 09:01:11 +0000 (17:01 +0800)
committerwangzhengyong <wangzhengyong@cmss.chinamobile.com>
Wed, 26 Apr 2017 01:10:28 +0000 (09:10 +0800)
commit0ccebc5c9b5bf819bab1c7f45976d10f7facbbfc
tree93ca159f4e4005287a85fd633677a407c446e44b
parent351f78d7b9a3049a6b199e9881c847d674e82ad4
librados: add cmpext API
The compare-extent (cmpext) operation allows callers to compare existing
object contents with an arbitrary buffer. cmpext requests can be
compounded with read and write operations, allowing for atomic object
content updates. return 0 on success, negative error code
on failure, (-MAX_ERRNO - mismatch_off) on mismatch

This commit is based on Mike Christie's initial C++ API, with the
addition of AIO support and a C API. Response marshalling was also
reworked, so that the miscompare offset is unmarshalled transparently to
the caller.

Signed-off-by: Zhengyong Wang <wangzhengyong@cmss.chinamobile.com>
Signed-off-by: David Disseldorp <ddiss@suse.de>
src/include/rados/librados.h
src/include/rados/librados.hpp
src/librados/IoCtxImpl.cc
src/librados/IoCtxImpl.h
src/librados/librados.cc
src/osdc/Objecter.h
src/tracing/librados.tp