]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
librados: add assert_exists guard operation
authorSage Weil <sage@inktank.com>
Tue, 23 Oct 2012 00:51:11 +0000 (17:51 -0700)
committerSage Weil <sage@inktank.com>
Tue, 23 Oct 2012 04:04:30 +0000 (21:04 -0700)
commite609c8ac54aade8b8afdfe9f0ad80308b9c89c2e
tree7125c7c22f26934f8afbf381fc817aa0b75cde02
parenteed28daaf8927339c2ecae1b1b06c1b63678ab03
librados: add assert_exists guard operation

Add a guard operation for writes that asserts that the object already
exists.  To avoid requiring new functionality on the OSD side, implement
this by including a STAT operation, and discard the results on the
client side.

Signed-off-by: Sage Weil <sage@inktank.com>
src/include/rados/librados.hpp
src/librados/librados.cc
src/test/rados-api/misc.cc