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