Helper library to use spdk_bdev as the backing device for a blobstore.
More...
|
| SPDK_STATIC_ASSERT (sizeof(struct spdk_bdev_bs_dev_opts)==8, "Incorrect size") |
|
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.
|
|
int | spdk_bdev_create_bs_dev (const char *bdev_name, bool write, struct spdk_bdev_bs_dev_opts *opts, size_t opts_size, spdk_bdev_event_cb_t event_cb, void *event_ctx, struct spdk_bs_dev **bs_dev) |
| Create a blobstore block device from a bdev.
|
|
void | spdk_bdev_update_bs_blockcnt (struct spdk_bs_dev *bs_dev) |
| Updates number of blocks of a blobstore block device.
|
|
int | spdk_bs_bdev_claim (struct spdk_bs_dev *bs_dev, struct spdk_bdev_module *module) |
| Claim the bdev module for the given blobstore.
|
|
Helper library to use spdk_bdev as the backing device for a blobstore.
◆ spdk_bdev_create_bs_dev()
Create a blobstore block device from a bdev.
- Parameters
-
bdev_name | The bdev to use. |
write | If true, open device read-write, else open read-only. |
opts | Additional options; none currently supported. |
opts_size | Size of structure referenced by opts. |
event_cb | Called when the bdev triggers asynchronous event. |
event_ctx | Argument passed to function event_cb. |
bs_dev | Output parameter for a pointer to the blobstore block device. |
- Returns
- 0 if operation is successful, or suitable errno value otherwise.
◆ spdk_bdev_create_bs_dev_ext()
Create a blobstore block device from a bdev.
- Parameters
-
bdev_name | Name of the bdev to use. |
event_cb | Called when the bdev triggers asynchronous event. |
event_ctx | Argument passed to function event_cb. |
bs_dev | Output parameter for a pointer to the blobstore block device. |
- Returns
- 0 if operation is successful, or suitable errno value otherwise.
◆ spdk_bdev_update_bs_blockcnt()
void spdk_bdev_update_bs_blockcnt |
( |
struct spdk_bs_dev * | bs_dev | ) |
|
Updates number of blocks of a blobstore block device.
- Parameters
-
bs_dev | Blobstore block device. |
◆ spdk_bs_bdev_claim()
Claim the bdev module for the given blobstore.
If bs_dev was opened read-write using spdk_bdev_create_bs_dev_ext(), a read-write-once claim is taken. If bs_dev was opened read-only using spdk_bdev_create_bs_dev(), a read-only-many claim is taken.
- Parameters
-
bs_dev | Blobstore block device. |
module | Bdev module to claim. |
- Returns
- 0 on success, negative errno on failure.