From 4404da7ceaec8b56602872c2637f327ff0232b3e Mon Sep 17 00:00:00 2001 From: Yanbo Zhou Date: Mon, 16 Apr 2018 11:47:32 +0800 Subject: [PATCH] include/blob.h: add comments for callback functions Change-Id: I984b70c47d4ec465775994945ea6ba588a0aed2b Signed-off-by: Yanbo Zhou Reviewed-on: https://review.gerrithub.io/407684 Tested-by: SPDK Automated Test System Reviewed-by: GangCao Reviewed-by: Daniel Verkamp Reviewed-by: Ben Walker --- include/spdk/blob.h | 48 +++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 44 insertions(+), 4 deletions(-) diff --git a/include/spdk/blob.h b/include/spdk/blob.h index 38c6140e3c..3c813e332b 100644 --- a/include/spdk/blob.h +++ b/include/spdk/blob.h @@ -75,17 +75,57 @@ struct spdk_io_channel; struct spdk_blob; struct spdk_xattr_names; +/** + * Blobstore operation completion callback. + * + * \param cb_arg Callback argument. + * \param bserrno 0 if it completed successfully, or negative errno if it failed. + */ typedef void (*spdk_bs_op_complete)(void *cb_arg, int bserrno); + +/** + * Blobstore operation completion callback with handle. + * + * \param cb_arg Callback argument. + * \param bs Handle to a blobstore. + * \param bserrno 0 if it completed successfully, or negative errno if it failed. + */ typedef void (*spdk_bs_op_with_handle_complete)(void *cb_arg, struct spdk_blob_store *bs, int bserrno); + +/** + * Blob operation completion callback. + * + * \param cb_arg Callback argument. + * \param bserrno 0 if it completed successfully, or negative errno if it failed. + */ typedef void (*spdk_blob_op_complete)(void *cb_arg, int bserrno); + +/** + * Blob operation completion callback with blob ID. + * + * \param cb_arg Callback argument. + * \param blobid Blob ID. + * \param bserrno 0 if it completed successfully, or negative errno if it failed. + */ typedef void (*spdk_blob_op_with_id_complete)(void *cb_arg, spdk_blob_id blobid, int bserrno); + +/** + * Blob operation completion callback with handle. + * + * \param cb_arg Callback argument. + * \param bs Handle to a blob. + * \param bserrno 0 if it completed successfully, or negative errno if it failed. + */ typedef void (*spdk_blob_op_with_handle_complete)(void *cb_arg, struct spdk_blob *blb, int bserrno); - -/* Calls to function pointers of this type must obey all of the normal - rules for channels. The channel passed to this completion must match - the channel the operation was initiated on. */ +/** + * Blobstore device completion callback. + * + * \param channel I/O channel the operation was initiated on. + * \param cb_arg Callback argument. + * \param bserrno 0 if it completed successfully, or negative errno if it failed. + */ typedef void (*spdk_bs_dev_cpl)(struct spdk_io_channel *channel, void *cb_arg, int bserrno);