diff --git a/CHANGELOG.md b/CHANGELOG.md index 3d4059a773..43d36ac21c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/include/spdk/bdev_module.h b/include/spdk/bdev_module.h index bbb9f94381..133f27a095 100644 --- a/include/spdk/bdev_module.h +++ b/include/spdk/bdev_module.h @@ -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. * diff --git a/lib/bdev/bdev.c b/lib/bdev/bdev.c index 1d3cd17ee9..25c8d7dbd7 100644 --- a/lib/bdev/bdev.c +++ b/lib/bdev/bdev.c @@ -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) { diff --git a/lib/bdev/part.c b/lib/bdev/part.c index 4b0e6fc1d6..917874e12a 100644 --- a/lib/bdev/part.c +++ b/lib/bdev/part.c @@ -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, diff --git a/lib/bdev/spdk_bdev.map b/lib/bdev/spdk_bdev.map index 267c8757e6..c3b7b54f81 100644 --- a/lib/bdev/spdk_bdev.map +++ b/lib/bdev/spdk_bdev.map @@ -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;