blob_bdev.h File Reference

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

Functions

int spdk_bdev_create_bs_dev_ext (const char *bdev_name, spdk_bdev_event_cb_t event_cb, void *event_ctx, struct spdk_bs_dev **bs_dev)
 Create a blobstore block device from 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_ext()

int spdk_bdev_create_bs_dev_ext ( const char *  bdev_name,
spdk_bdev_event_cb_t  event_cb,
void *  event_ctx,
struct spdk_bs_dev **  bs_dev 
)

Create a blobstore block device from a bdev.

Parameters
bdev_nameName of the bdev to use.
event_cbCalled when the bdev triggers asynchronous event.
event_ctxArgument passed to function event_cb.
bs_devOutput parameter for a pointer to the blobstore block device.
Returns
0 if operation is successful, or suitable errno value 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.