]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
librados: add exec to the c object operations api
authorJosh Durgin <josh.durgin@inktank.com>
Fri, 7 Feb 2014 03:51:59 +0000 (19:51 -0800)
committerJosh Durgin <josh.durgin@inktank.com>
Tue, 18 Feb 2014 20:34:33 +0000 (12:34 -0800)
commit2543cde79326088da232c1ce1a45287dbdb4397a
treec514518d3f595eed5c8acbc1d6f301c6a325bc64
parent0dc4309b0855825b08076b829ea19ee9a08b9b18
librados: add exec to the c object operations api

Add two versions: one that allocates a buffer of the appropriate
length for the user, but relies on the user to free it, and one that
uses a user-supplied buffer but may fail if it is too short.

Reuse the bufferlist -> buffer conversion context added for reads into
the user supplied buffer.

The librados-allocated buffer can be handled just like librados
allocated buffers used by the various command functions, so just reuse
do_out_buffer() for them.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
src/include/rados/librados.h
src/librados/librados.cc
src/test/librados/c_read_operations.cc