include/blob.h: add comments for callback functions

Change-Id: I984b70c47d4ec465775994945ea6ba588a0aed2b
Signed-off-by: Yanbo Zhou <yanbo.zhou@intel.com>
Reviewed-on: https://review.gerrithub.io/407684
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: GangCao <gang.cao@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
Yanbo Zhou 2018-04-16 11:47:32 +08:00 committed by Jim Harris
parent 01a9118d0c
commit 4404da7cea

View File

@ -75,17 +75,57 @@ struct spdk_io_channel;
struct spdk_blob; struct spdk_blob;
struct spdk_xattr_names; 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); 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, typedef void (*spdk_bs_op_with_handle_complete)(void *cb_arg, struct spdk_blob_store *bs,
int bserrno); 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); 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); 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); 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 * Blobstore device completion callback.
rules for channels. The channel passed to this completion must match *
the channel the operation was initiated on. */ * \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, typedef void (*spdk_bs_dev_cpl)(struct spdk_io_channel *channel,
void *cb_arg, int bserrno); void *cb_arg, int bserrno);