module/bdev: remove deprecated API
spdk_vbdev_register() was deprecated in SPDK 19.04. config_text field in spdk_bdev_module was deprecated in SPDK 20.10. spdk_bdev_part_base_construct() was deprecated in SPDK 20.10. Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Change-Id: Ib795ccdf61154c168032ccf8b81ea77e5e663851 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6628 Community-CI: Broadcom CI Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
This commit is contained in:
parent
99935996f2
commit
13f868977e
@ -8,6 +8,8 @@ For `bdev_ocssd_create` RPC, the optional parameter `range` was removed.
|
||||
Only one OCSSD bdev can be created for one OCSSD namespace.
|
||||
|
||||
Removed the `spdk_bdev_open` from bdev library API.
|
||||
Removed the `spdk_vbdev_register` and `spdk_bdev_part_base_construct` from bdev module API.
|
||||
Removed the `config_text` function for bdev modules to report legacy config.
|
||||
|
||||
### blobstore
|
||||
|
||||
|
@ -85,13 +85,6 @@ struct spdk_bdev_module {
|
||||
*/
|
||||
void (*module_fini)(void);
|
||||
|
||||
/**
|
||||
* Function called to return a text string representing the
|
||||
* module's configuration options for inclusion in a configuration file.
|
||||
* (Deprecated and shall not be called by bdev layer)
|
||||
*/
|
||||
void (*config_text)(FILE *fp);
|
||||
|
||||
/**
|
||||
* Function called to return a text string representing the module-level
|
||||
* JSON RPCs required to regenerate the current configuration. This will
|
||||
@ -734,25 +727,6 @@ void spdk_bdev_unregister(struct spdk_bdev *bdev, spdk_bdev_unregister_cb cb_fn,
|
||||
*/
|
||||
void spdk_bdev_destruct_done(struct spdk_bdev *bdev, int bdeverrno);
|
||||
|
||||
/**
|
||||
* Register a virtual bdev.
|
||||
*
|
||||
* This function is deprecated. Users should call spdk_bdev_register instead.
|
||||
* The bdev layer currently makes no use of the base_bdevs array, so switching
|
||||
* to spdk_bdev_register results in no loss of functionality.
|
||||
*
|
||||
* \param vbdev Virtual bdev to register.
|
||||
* \param base_bdevs Array of bdevs upon which this vbdev is based.
|
||||
* \param base_bdev_count Number of bdevs in base_bdevs.
|
||||
*
|
||||
* \return 0 on success
|
||||
* \return -EINVAL if the bdev name is NULL.
|
||||
* \return -EEXIST if the bdev already exists.
|
||||
* \return -ENOMEM if allocation of the base_bdevs array or the base bdevs vbdevs array fails.
|
||||
*/
|
||||
int spdk_vbdev_register(struct spdk_bdev *vbdev, struct spdk_bdev **base_bdevs,
|
||||
int base_bdev_count);
|
||||
|
||||
/**
|
||||
* Indicate to the bdev layer that the module is done examining a bdev.
|
||||
*
|
||||
@ -1112,35 +1086,6 @@ int spdk_bdev_part_free(struct spdk_bdev_part *part);
|
||||
void spdk_bdev_part_base_hotremove(struct spdk_bdev_part_base *part_base,
|
||||
struct bdev_part_tailq *tailq);
|
||||
|
||||
/**
|
||||
* Construct a new spdk_bdev_part_base on top of the provided bdev
|
||||
* (deprecated. please use spdk_bdev_part_base_construct_ext).
|
||||
*
|
||||
* \param bdev The spdk_bdev upon which this base will be built.
|
||||
* \param remove_cb Function to be called upon hotremove of the bdev.
|
||||
* \param module The module to which this bdev base belongs.
|
||||
* \param fn_table Function table for communicating with the bdev backend.
|
||||
* \param tailq The head of the list of all spdk_bdev_part structures registered to this base's module.
|
||||
* \param free_fn User provided function to free base related context upon bdev removal or shutdown.
|
||||
* \param ctx Module specific context for this bdev part base.
|
||||
* \param channel_size Channel size in bytes.
|
||||
* \param ch_create_cb Called after a new channel is allocated.
|
||||
* \param ch_destroy_cb Called upon channel deletion.
|
||||
*
|
||||
* \return The part object on top of the bdev if operation is successful, or
|
||||
* NULL otherwise.
|
||||
*/
|
||||
struct spdk_bdev_part_base *spdk_bdev_part_base_construct(struct spdk_bdev *bdev,
|
||||
spdk_bdev_remove_cb_t remove_cb,
|
||||
struct spdk_bdev_module *module,
|
||||
struct spdk_bdev_fn_table *fn_table,
|
||||
struct bdev_part_tailq *tailq,
|
||||
spdk_bdev_part_base_free_fn free_fn,
|
||||
void *ctx,
|
||||
uint32_t channel_size,
|
||||
spdk_io_channel_create_cb ch_create_cb,
|
||||
spdk_io_channel_destroy_cb ch_destroy_cb);
|
||||
|
||||
/**
|
||||
* Construct a new spdk_bdev_part_base on top of the provided bdev.
|
||||
*
|
||||
|
@ -5537,13 +5537,6 @@ spdk_bdev_register(struct spdk_bdev *bdev)
|
||||
return rc;
|
||||
}
|
||||
|
||||
int
|
||||
spdk_vbdev_register(struct spdk_bdev *vbdev, struct spdk_bdev **base_bdevs, int base_bdev_count)
|
||||
{
|
||||
SPDK_ERRLOG("This function is deprecated. Use spdk_bdev_register() instead.\n");
|
||||
return spdk_bdev_register(vbdev);
|
||||
}
|
||||
|
||||
void
|
||||
spdk_bdev_destruct_done(struct spdk_bdev *bdev, int bdeverrno)
|
||||
{
|
||||
|
@ -491,27 +491,6 @@ spdk_bdev_part_base_construct_ext(const char *bdev_name,
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct spdk_bdev_part_base *
|
||||
spdk_bdev_part_base_construct(struct spdk_bdev *bdev,
|
||||
spdk_bdev_remove_cb_t remove_cb, struct spdk_bdev_module *module,
|
||||
struct spdk_bdev_fn_table *fn_table, struct bdev_part_tailq *tailq,
|
||||
spdk_bdev_part_base_free_fn free_fn, void *ctx,
|
||||
uint32_t channel_size, spdk_io_channel_create_cb ch_create_cb,
|
||||
spdk_io_channel_destroy_cb ch_destroy_cb)
|
||||
{
|
||||
struct spdk_bdev_part_base *base = NULL;
|
||||
int rc;
|
||||
|
||||
rc = spdk_bdev_part_base_construct_ext(spdk_bdev_get_name(bdev), remove_cb, module,
|
||||
fn_table, tailq, free_fn, ctx,
|
||||
channel_size, ch_create_cb, ch_destroy_cb, &base);
|
||||
if (rc == 0) {
|
||||
return base;
|
||||
} else {
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
spdk_bdev_part_construct(struct spdk_bdev_part *part, struct spdk_bdev_part_base *base,
|
||||
char *name, uint64_t offset_blocks, uint64_t num_blocks,
|
||||
|
@ -99,7 +99,6 @@
|
||||
spdk_bdev_register;
|
||||
spdk_bdev_unregister;
|
||||
spdk_bdev_destruct_done;
|
||||
spdk_vbdev_register;
|
||||
spdk_bdev_module_examine_done;
|
||||
spdk_bdev_module_init_done;
|
||||
spdk_bdev_module_finish_done;
|
||||
@ -132,7 +131,6 @@
|
||||
spdk_bdev_part_base_free;
|
||||
spdk_bdev_part_free;
|
||||
spdk_bdev_part_base_hotremove;
|
||||
spdk_bdev_part_base_construct;
|
||||
spdk_bdev_part_base_construct_ext;
|
||||
spdk_bdev_part_construct;
|
||||
spdk_bdev_part_submit_request;
|
||||
|
Loading…
Reference in New Issue
Block a user