lib/nvmf: remove deprecated API
spdk_nvmf_subsystem_add_ns() was deprecated in SPDK 20.10. spdk_nvmf_tgt_listen() was deprecated in SPDK 21.01. Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Change-Id: I2e447a50713e71a70030d094e6cc0bf427635ef7 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6631 Community-CI: Broadcom CI Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
This commit is contained in:
parent
144eac1362
commit
fe8af2281b
@ -54,6 +54,10 @@ independent SPDK processes are running on one node. The filter function can
|
||||
then be implemented in these processes to decide which SSDs to probe based on
|
||||
the new SSD's PCI address.
|
||||
|
||||
### nvmf
|
||||
|
||||
Removed the `spdk_nvmf_tgt_listen` and `spdk_nvmf_subsystem_add_ns` API.
|
||||
|
||||
### opal
|
||||
|
||||
Removed the `spdk_opal_supported` API.
|
||||
|
@ -68,7 +68,7 @@ system. This is used for access control.
|
||||
|
||||
A user of the NVMe-oF target library begins by creating a target using
|
||||
spdk_nvmf_tgt_create(), setting up a set of addresses on which to accept
|
||||
connections by calling spdk_nvmf_tgt_listen(), then creating a subsystem
|
||||
connections by calling spdk_nvmf_tgt_listen_ext(), then creating a subsystem
|
||||
using spdk_nvmf_subsystem_create().
|
||||
|
||||
Subsystems begin in an inactive state and must be activated by calling
|
||||
@ -78,7 +78,7 @@ calling spdk_nvmf_subsystem_pause() and resumed by calling
|
||||
spdk_nvmf_subsystem_resume().
|
||||
|
||||
Namespaces may be added to the subsystem by calling
|
||||
spdk_nvmf_subsystem_add_ns() when the subsystem is inactive or paused.
|
||||
spdk_nvmf_subsystem_add_ns_ext() when the subsystem is inactive or paused.
|
||||
Namespaces are bdevs. See @ref bdev for more information about the SPDK bdev
|
||||
layer. A bdev may be obtained by calling spdk_bdev_get_by_name().
|
||||
|
||||
|
@ -233,21 +233,6 @@ struct spdk_nvmf_tgt *spdk_nvmf_get_next_tgt(struct spdk_nvmf_tgt *prev);
|
||||
*/
|
||||
void spdk_nvmf_tgt_write_config_json(struct spdk_json_write_ctx *w, struct spdk_nvmf_tgt *tgt);
|
||||
|
||||
/**
|
||||
* Begin accepting new connections at the address provided (deprecated, please use spdk_nvmf_tgt_listen_ext).
|
||||
*
|
||||
* The connections will be matched with a subsystem, which may or may not allow
|
||||
* the connection based on a subsystem-specific list of allowed hosts. See
|
||||
* spdk_nvmf_subsystem_add_host() and spdk_nvmf_subsystem_add_listener()
|
||||
*
|
||||
* \param tgt The target associated with this listen address.
|
||||
* \param trid The address to listen at.
|
||||
*
|
||||
* \return 0 on success or a negated errno on failure.
|
||||
*/
|
||||
int spdk_nvmf_tgt_listen(struct spdk_nvmf_tgt *tgt,
|
||||
struct spdk_nvme_transport_id *trid);
|
||||
|
||||
/**
|
||||
* Begin accepting new connections at the address provided.
|
||||
*
|
||||
@ -267,7 +252,7 @@ int spdk_nvmf_tgt_listen_ext(struct spdk_nvmf_tgt *tgt, const struct spdk_nvme_t
|
||||
/**
|
||||
* Stop accepting new connections at the provided address.
|
||||
*
|
||||
* This is a counterpart to spdk_nvmf_tgt_listen().
|
||||
* This is a counterpart to spdk_nvmf_tgt_listen_ext().
|
||||
*
|
||||
* \param tgt The target associated with the listen address.
|
||||
* \param trid The address to stop listening at.
|
||||
@ -623,7 +608,7 @@ const char *spdk_nvmf_host_get_nqn(const struct spdk_nvmf_host *host);
|
||||
/**
|
||||
* Accept new connections on the address provided.
|
||||
*
|
||||
* This does not start the listener. Use spdk_nvmf_tgt_listen() for that.
|
||||
* This does not start the listener. Use spdk_nvmf_tgt_listen_ext() for that.
|
||||
*
|
||||
* May only be performed on subsystems in the PAUSED or INACTIVE states.
|
||||
* No namespaces are required to be paused.
|
||||
@ -777,23 +762,6 @@ struct spdk_nvmf_ns_opts {
|
||||
*/
|
||||
void spdk_nvmf_ns_opts_get_defaults(struct spdk_nvmf_ns_opts *opts, size_t opts_size);
|
||||
|
||||
/**
|
||||
* Add a namespace to a subsytem (deprecated, please use spdk_nvmf_subsystem_add_ns_ext).
|
||||
*
|
||||
* May only be performed on subsystems in the PAUSED or INACTIVE states.
|
||||
*
|
||||
* \param subsystem Subsystem to add namespace to.
|
||||
* \param bdev Block device to add as a namespace.
|
||||
* \param opts Namespace options, or NULL to use defaults.
|
||||
* \param opts_size sizeof(*opts)
|
||||
* \param ptpl_file Persist through power loss file path.
|
||||
*
|
||||
* \return newly added NSID on success, or 0 on failure.
|
||||
*/
|
||||
uint32_t spdk_nvmf_subsystem_add_ns(struct spdk_nvmf_subsystem *subsystem, struct spdk_bdev *bdev,
|
||||
const struct spdk_nvmf_ns_opts *opts, size_t opts_size,
|
||||
const char *ptpl_file);
|
||||
|
||||
/**
|
||||
* Add a namespace to a subsystems in the PAUSED or INACTIVE states.
|
||||
*
|
||||
@ -1111,7 +1079,7 @@ spdk_nvmf_transport_stop_listen(struct spdk_nvmf_transport *transport,
|
||||
/**
|
||||
* Stop accepting new connections at the provided address.
|
||||
*
|
||||
* This is a counterpart to spdk_nvmf_tgt_listen(). It differs
|
||||
* This is a counterpart to spdk_nvmf_tgt_listen_ext(). It differs
|
||||
* from spdk_nvmf_transport_stop_listen() in that it also destroys all
|
||||
* qpairs that are connected to the specified listener. Because
|
||||
* this function disconnects the qpairs, it has to be asynchronous.
|
||||
|
@ -667,16 +667,6 @@ spdk_nvmf_tgt_listen_ext(struct spdk_nvmf_tgt *tgt, const struct spdk_nvme_trans
|
||||
return rc;
|
||||
}
|
||||
|
||||
int
|
||||
spdk_nvmf_tgt_listen(struct spdk_nvmf_tgt *tgt, struct spdk_nvme_transport_id *trid)
|
||||
{
|
||||
struct spdk_nvmf_listen_opts opts;
|
||||
|
||||
spdk_nvmf_listen_opts_init(&opts, sizeof(opts));
|
||||
|
||||
return spdk_nvmf_tgt_listen_ext(tgt, trid, &opts);
|
||||
}
|
||||
|
||||
int
|
||||
spdk_nvmf_tgt_stop_listen(struct spdk_nvmf_tgt *tgt,
|
||||
struct spdk_nvme_transport_id *trid)
|
||||
|
@ -10,7 +10,6 @@
|
||||
spdk_nvmf_get_next_tgt;
|
||||
spdk_nvmf_tgt_write_config_json;
|
||||
spdk_nvmf_listen_opts_init;
|
||||
spdk_nvmf_tgt_listen;
|
||||
spdk_nvmf_tgt_listen_ext;
|
||||
spdk_nvmf_tgt_stop_listen;
|
||||
spdk_nvmf_poll_group_create;
|
||||
@ -49,7 +48,6 @@
|
||||
spdk_nvmf_subsystem_allow_any_listener;
|
||||
spdk_nvmf_subsytem_any_listener_allowed;
|
||||
spdk_nvmf_ns_opts_get_defaults;
|
||||
spdk_nvmf_subsystem_add_ns;
|
||||
spdk_nvmf_subsystem_add_ns_ext;
|
||||
spdk_nvmf_subsystem_remove_ns;
|
||||
spdk_nvmf_subsystem_get_first_ns;
|
||||
|
@ -1486,15 +1486,6 @@ spdk_nvmf_subsystem_add_ns_ext(struct spdk_nvmf_subsystem *subsystem, const char
|
||||
return opts.nsid;
|
||||
}
|
||||
|
||||
uint32_t
|
||||
spdk_nvmf_subsystem_add_ns(struct spdk_nvmf_subsystem *subsystem, struct spdk_bdev *bdev,
|
||||
const struct spdk_nvmf_ns_opts *user_opts, size_t opts_size,
|
||||
const char *ptpl_file)
|
||||
{
|
||||
return spdk_nvmf_subsystem_add_ns_ext(subsystem, spdk_bdev_get_name(bdev),
|
||||
user_opts, opts_size, ptpl_file);
|
||||
}
|
||||
|
||||
static uint32_t
|
||||
nvmf_subsystem_get_next_allocated_nsid(struct spdk_nvmf_subsystem *subsystem,
|
||||
uint32_t prev_nsid)
|
||||
|
Loading…
Reference in New Issue
Block a user