bdev: mark delete_bdev RPC deprecated

This RPC doesn't really work in some cases - for example,
trying to delete one NVMe namespace bdev from a controller
with multiple namespaces, or just one virtio SCSI device
from a virtio-scsi controller.  We've previously kept it
and marked it as "debugging only" - but every bdev module
has its own RPC method now for deleting what it constructed,
so keeping the generic delete_bdev RPC is asking for
trouble in some of the cases mentioned above.  We'll remove
it in the 19.04 release.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I639254b32a3e1c840a4e9ae2658c42f4f321b676

Reviewed-on: https://review.gerrithub.io/c/442616
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This commit is contained in:
Jim Harris 2019-01-29 10:56:10 -07:00
parent 51725c486c
commit abc156458f
3 changed files with 6 additions and 9 deletions

View File

@ -102,14 +102,6 @@ the data and show table containing IO count for latency ranges.
The command will disable histogram on Nvme0n1 device.
## delete_bdev {#bdev_ug_delete_bdev}
To remove previously created bdev user can use `delete_bdev` RPC command.
Bdev can be deleted at any time and this will be fully handled by any upper
layers. As an argument user should provide bdev name. This RPC command
should be used only for debugging purpose. To remove a particular bdev please
use the delete command specific to its bdev module.
# Ceph RBD {#bdev_config_rbd}
The SPDK RBD bdev driver provides SPDK block layer access to Ceph RADOS block

View File

@ -713,7 +713,9 @@ Note that histogram field is trimmed, actual encoded histogram length is ~80kb.
## delete_bdev {#rpc_delete_bdev}
Unregister a block device.
Unregister a block device. This RPC is deprecated. Users should instead use
the specific deletion RPC for the bdev type to be removed (i.e.
delete_malloc_bdev).
### Parameters

View File

@ -405,6 +405,9 @@ spdk_rpc_delete_bdev(struct spdk_jsonrpc_request *request,
struct rpc_delete_bdev req = {};
struct spdk_bdev *bdev;
SPDK_ERRLOG("The delete_bdev RPC is deprecated. Please use the RPC specific\n");
SPDK_ERRLOG("to the bdev type being deleted.\n");
if (spdk_json_decode_object(params, rpc_delete_bdev_decoders,
SPDK_COUNTOF(rpc_delete_bdev_decoders),
&req)) {