]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
include/rados/librados.h: note that {read,write}_op cannot be reused
authorKefu Chai <kchai@redhat.com>
Mon, 30 Nov 2020 07:01:37 +0000 (15:01 +0800)
committerKefu Chai <kchai@redhat.com>
Mon, 30 Nov 2020 07:02:10 +0000 (15:02 +0800)
Signed-off-by: Kefu Chai <kchai@redhat.com>
src/include/rados/librados.h

index 27031419f1f164a864b90f8edf40e1d8a5a62272..17fa5b7ce2dcdb30ce98b3494200ff7537ebd863 100644 (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);