blob_bdev.h File Reference

Helper library to use spdk_bdev as the backing device for a blobstore. More...

Functions

struct spdk_bs_devspdk_bdev_create_bs_dev (struct spdk_bdev *bdev, spdk_bdev_remove_cb_t remove_cb, void *remove_ctx)
 Create a blobstore block device from a bdev. More...
 
struct spdk_bs_devspdk_bdev_create_bs_dev_from_desc (struct spdk_bdev_desc *desc)
 Create a blobstore block device from the descriptor of a bdev. More...
 
int spdk_bs_bdev_claim (struct spdk_bs_dev *bs_dev, struct spdk_bdev_module *module)
 Claim the bdev module for the given blobstore. More...
 

Detailed Description

Helper library to use spdk_bdev as the backing device for a blobstore.

Function Documentation

◆ spdk_bdev_create_bs_dev()

struct spdk_bs_dev* spdk_bdev_create_bs_dev ( struct spdk_bdev bdev,
spdk_bdev_remove_cb_t  remove_cb,
void *  remove_ctx 
)

Create a blobstore block device from a bdev.

(deprecated, please use spdk_bdev_create_bs_dev_from_desc, together with spdk_bdev_open_ext).

Parameters
bdevBdev to use.
remove_cbCalled when the block device is removed.
remove_ctxArgument passed to function remove_cb.
Returns
a pointer to the blobstore block device on success or NULL otherwise.

◆ spdk_bdev_create_bs_dev_from_desc()

struct spdk_bs_dev* spdk_bdev_create_bs_dev_from_desc ( struct spdk_bdev_desc *  desc)

Create a blobstore block device from the descriptor of a bdev.

Parameters
descDescriptor of a bdev. spdk_bdev_open_ext() is recommended to get the desc.
Returns
a pointer to the blobstore block device on success or NULL otherwise.

◆ spdk_bs_bdev_claim()

int spdk_bs_bdev_claim ( struct spdk_bs_dev bs_dev,
struct spdk_bdev_module module 
)

Claim the bdev module for the given blobstore.

Parameters
bs_devBlobstore block device.
moduleBdev module to claim.
Returns
0 on success, negative errno on failure.