module/blob: remove deprecated spdk_bdev_create_bs_dev/from_desc()
spdk_bdev_create_bs_dev was deprecated in SPDK 19.10 spdk_bdev_create_bs_dev_from_desc was deprecated in SPDK 20.10 Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Change-Id: I1290958923f7833579d098a693454e7ab7656307 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6624 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Mellanox Build Bot Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
parent
a38d241cd6
commit
3e15b356f3
@ -7,6 +7,10 @@
|
|||||||
For `bdev_ocssd_create` RPC, the optional parameter `range` was removed.
|
For `bdev_ocssd_create` RPC, the optional parameter `range` was removed.
|
||||||
Only one OCSSD bdev can be created for one OCSSD namespace.
|
Only one OCSSD bdev can be created for one OCSSD namespace.
|
||||||
|
|
||||||
|
### blobstore
|
||||||
|
|
||||||
|
Removed the `spdk_bdev_create_bs_dev_from_desc` and `spdk_bdev_create_bs_dev` API.
|
||||||
|
|
||||||
### env
|
### env
|
||||||
|
|
||||||
Added spdk_pci_device_allow API to allow applications to add PCI addresses to
|
Added spdk_pci_device_allow API to allow applications to add PCI addresses to
|
||||||
|
@ -49,27 +49,6 @@ struct spdk_bs_dev;
|
|||||||
struct spdk_bdev;
|
struct spdk_bdev;
|
||||||
struct spdk_bdev_module;
|
struct spdk_bdev_module;
|
||||||
|
|
||||||
/**
|
|
||||||
* Create a blobstore block device from a bdev (deprecated, please use spdk_bdev_create_bs_dev_ext).
|
|
||||||
*
|
|
||||||
* \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);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Create a blobstore block device from the descriptor of a bdev (deprecated, please use spdk_bdev_create_bs_dev_ext).
|
|
||||||
*
|
|
||||||
* \param desc Descriptor of a bdev. spdk_bdev_open_ext() is recommended to get the desc.
|
|
||||||
*
|
|
||||||
* \return a pointer to the blobstore block device on success or NULL otherwise.
|
|
||||||
*/
|
|
||||||
struct spdk_bs_dev *spdk_bdev_create_bs_dev_from_desc(struct spdk_bdev_desc *desc);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a blobstore block device from a bdev.
|
* Create a blobstore block device from a bdev.
|
||||||
*
|
*
|
||||||
|
@ -349,49 +349,6 @@ blob_bdev_init(struct blob_bdev *b, struct spdk_bdev_desc *desc)
|
|||||||
b->bs_dev.get_base_bdev = bdev_blob_get_base_bdev;
|
b->bs_dev.get_base_bdev = bdev_blob_get_base_bdev;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct spdk_bs_dev *
|
|
||||||
spdk_bdev_create_bs_dev(struct spdk_bdev *bdev, spdk_bdev_remove_cb_t remove_cb, void *remove_ctx)
|
|
||||||
{
|
|
||||||
struct blob_bdev *b;
|
|
||||||
struct spdk_bdev_desc *desc;
|
|
||||||
int rc;
|
|
||||||
|
|
||||||
b = calloc(1, sizeof(*b));
|
|
||||||
|
|
||||||
if (b == NULL) {
|
|
||||||
SPDK_ERRLOG("could not allocate blob_bdev\n");
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
rc = spdk_bdev_open(bdev, true, remove_cb, remove_ctx, &desc);
|
|
||||||
if (rc != 0) {
|
|
||||||
free(b);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
blob_bdev_init(b, desc);
|
|
||||||
|
|
||||||
return &b->bs_dev;
|
|
||||||
}
|
|
||||||
|
|
||||||
struct spdk_bs_dev *
|
|
||||||
spdk_bdev_create_bs_dev_from_desc(struct spdk_bdev_desc *desc)
|
|
||||||
{
|
|
||||||
struct blob_bdev *b;
|
|
||||||
|
|
||||||
b = calloc(1, sizeof(*b));
|
|
||||||
|
|
||||||
if (b == NULL) {
|
|
||||||
SPDK_ERRLOG("could not allocate blob_bdev\n");
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
blob_bdev_init(b, desc);
|
|
||||||
|
|
||||||
return &b->bs_dev;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
spdk_bdev_create_bs_dev_ext(const char *bdev_name, spdk_bdev_event_cb_t event_cb,
|
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)
|
void *event_ctx, struct spdk_bs_dev **_bs_dev)
|
||||||
|
Loading…
Reference in New Issue
Block a user