nvme: annotate and log existing deprecation

Use the deprecation API to annotate and log the deprecation of
spdk_nvme_ctrlr_prepare_for_reset() using the tag
"nvme_ctrlr_prepare_for_reset".

Signed-off-by: Mike Gerdts <mgerdts@nvidia.com>
Change-Id: I98fd840aa9acc028a49bb47daf4ab7e88f1eb818
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15756
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
Mike Gerdts 2022-12-01 23:20:01 -06:00 committed by Tomasz Zawadzki
parent 5121b9a2fd
commit 9d06166f5b
2 changed files with 7 additions and 0 deletions

View File

@ -21,5 +21,7 @@ The tags can be matched with the level 4 headers below.
### nvme
#### `nvme_ctrlr_prepare_for_reset``
Deprecated `spdk_nvme_ctrlr_prepare_for_reset` API, which will be removed in SPDK 22.01.
For PCIe transport, `spdk_nvme_ctrlr_disconnect` should be used before freeing I/O qpairs.

View File

@ -1831,9 +1831,14 @@ spdk_nvme_ctrlr_reset(struct spdk_nvme_ctrlr *ctrlr)
return rc;
}
SPDK_LOG_DEPRECATION_REGISTER(nvme_ctrlr_prepare_for_reset,
"spdk_nvme_ctrlr_prepare_for_reset() is deprecated",
"SPDK 22.01", 0);
void
spdk_nvme_ctrlr_prepare_for_reset(struct spdk_nvme_ctrlr *ctrlr)
{
SPDK_LOG_DEPRECATED(nvme_ctrlr_prepare_for_reset);
nvme_robust_mutex_lock(&ctrlr->ctrlr_lock);
ctrlr->prepare_for_reset = true;
nvme_robust_mutex_unlock(&ctrlr->ctrlr_lock);