From c60422dd96f57a332f6d58b4a767ca799ba07af4 Mon Sep 17 00:00:00 2001 From: Yanbo Zhou Date: Wed, 13 Dec 2017 10:32:43 +0800 Subject: [PATCH] include/blob_bdev.h: add comments for public APIs Change-Id: Id429d420a79dbe5efdd6720c0a25e6fe04911c3a Signed-off-by: Yanbo Zhou Reviewed-on: https://review.gerrithub.io/391513 Tested-by: SPDK Automated Test System Reviewed-by: Paul Luse Reviewed-by: Jim Harris Reviewed-by: Ben Walker --- include/spdk/blob_bdev.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/include/spdk/blob_bdev.h b/include/spdk/blob_bdev.h index 2fb69c094..c50c439b7 100644 --- a/include/spdk/blob_bdev.h +++ b/include/spdk/blob_bdev.h @@ -49,9 +49,26 @@ struct spdk_bs_dev; struct spdk_bdev; struct spdk_bdev_module_if; +/** + * Create a blobstore block device from a bdev. + * + * \param bdev Bdev to use. + * \param remove_cb Called when the block device is removed. + * \param remove_ctx Argument passed to function remove_cb. + * + * \return a pointer to the blobstore block device on success or NULL otherwise. + */ struct spdk_bs_dev *spdk_bdev_create_bs_dev(struct spdk_bdev *bdev, spdk_bdev_remove_cb_t remove_cb, void *remove_ctx); +/** + * Claim the bdev module for the given blobstore. + * + * \param bs_dev Blobstore block device. + * \param module Bdev module to claim. + * + * \return 0 on success, negative errno on failure. + */ int spdk_bs_bdev_claim(struct spdk_bs_dev *bs_dev, struct spdk_bdev_module_if *module); #ifdef __cplusplus