include/rados/librados.h: note that {read,write}_op cannot be reused

Signed-off-by: Kefu Chai <kchai@redhat.com>
This commit is contained in:
Kefu Chai 2020-11-30 15:01:37 +08:00
parent 1bfdd2c1c2
commit 4bcf237003

View File

@ -2805,6 +2805,10 @@ CEPH_RADOS_API int rados_set_alloc_hint2(rados_ioctx_t io, const char *o,
* to be performed atomically. You must call rados_release_write_op when you are
* finished with it.
*
* @note the ownership of a write operartion is passed to the function
* performing the operation, so the same instance of @c rados_write_op_t
* cannot be used again after being performed.
*
* @returns non-NULL on success, NULL on memory allocation error.
*/
CEPH_RADOS_API rados_write_op_t rados_create_write_op(void);
@ -3188,11 +3192,15 @@ CEPH_RADOS_API int rados_aio_write_op_operate(rados_write_op_t write_op,
int flags);
/**
* Create a new rados_read_op_t write operation. This will store all
* Create a new rados_read_op_t read operation. This will store all
* actions to be performed atomically. You must call
* rados_release_read_op when you are finished with it (after it
* completes, or you decide not to send it in the first place).
*
* @note the ownership of a read operartion is passed to the function
* performing the operation, so the same instance of @c rados_read_op_t
* cannot be used again after being performed.
*
* @returns non-NULL on success, NULL on memory allocation error.
*/
CEPH_RADOS_API rados_read_op_t rados_create_read_op(void);