bdev/virtio: Remove deprecated construct_virtio_user_blk_dev rpc

This was marked deprecated in 18.10

Change-Id: Id47e770b0388c935fe684aeef7a9824f24cef47f
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/442416
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
Ben Walker 2019-01-28 10:59:17 -07:00 committed by Darek Stojaczyk
parent 63edd8bad0
commit 766b7ef2ed
4 changed files with 0 additions and 94 deletions

View File

@ -274,7 +274,6 @@ Example response:
"scan_ioat_copy_engine",
"construct_virtio_dev",
"construct_virtio_pci_blk_bdev",
"construct_virtio_user_blk_bdev",
"get_virtio_scsi_devs",
"remove_virtio_bdev",
"remove_virtio_scsi_bdev",
@ -2275,12 +2274,6 @@ Example response:
}
~~~
## construct_virtio_user_blk_bdev {#rpc_construct_virtio_user_blk_bdev}
This is legacy RPC method. It is equivalent of @ref rpc_construct_virtio_dev with `trtype` set to `user` and `dev_type` set to `blk`.
Because it will be deprecated soon it is intentionally undocumented.
## construct_virtio_pci_blk_bdev {#rpc_construct_virtio_pci_blk_bdev}

View File

@ -198,60 +198,6 @@ free_rpc_construct_virtio_blk_dev(struct rpc_construct_virtio_blk_dev *req)
free(req->name);
}
static const struct spdk_json_object_decoder rpc_construct_virtio_user_blk_dev[] = {
{"path", offsetof(struct rpc_construct_virtio_blk_dev, path), spdk_json_decode_string },
{"name", offsetof(struct rpc_construct_virtio_blk_dev, name), spdk_json_decode_string },
{"vq_count", offsetof(struct rpc_construct_virtio_blk_dev, vq_count), spdk_json_decode_uint32, true },
{"vq_size", offsetof(struct rpc_construct_virtio_blk_dev, vq_size), spdk_json_decode_uint32, true },
};
static void
spdk_rpc_create_virtio_user_blk_bdev(struct spdk_jsonrpc_request *request,
const struct spdk_json_val *params)
{
struct rpc_construct_virtio_blk_dev req = {0};
struct spdk_json_write_ctx *w;
struct spdk_bdev *bdev;
int rc;
req.pci_address = NULL;
req.vq_count = SPDK_VIRTIO_USER_DEFAULT_VQ_COUNT;
req.vq_size = SPDK_VIRTIO_USER_DEFAULT_QUEUE_SIZE;
SPDK_WARNLOG("construct_virtio_user_blk_bdev command has been deprecated and will be removed "
"in the subsequent release. Please use construct_virtio_dev instead.\n");
if (spdk_json_decode_object(params, rpc_construct_virtio_user_blk_dev,
SPDK_COUNTOF(rpc_construct_virtio_user_blk_dev),
&req)) {
free_rpc_construct_virtio_blk_dev(&req);
rc = -EINVAL;
goto invalid;
}
bdev = bdev_virtio_user_blk_dev_create(req.name, req.path, req.vq_count, req.vq_size);
free_rpc_construct_virtio_blk_dev(&req);
if (bdev == NULL) {
rc = -EINVAL;
goto invalid;
}
w = spdk_jsonrpc_begin_result(request);
if (w == NULL) {
return;
}
spdk_json_write_string(w, spdk_bdev_get_name(bdev));
spdk_jsonrpc_end_result(request, w);
return;
invalid:
spdk_jsonrpc_send_error_response(request, SPDK_JSONRPC_ERROR_INVALID_PARAMS,
spdk_strerror(-rc));
}
SPDK_RPC_REGISTER("construct_virtio_user_blk_bdev", spdk_rpc_create_virtio_user_blk_bdev,
SPDK_RPC_RUNTIME);
static const struct spdk_json_object_decoder rpc_construct_virtio_pci_blk_dev[] = {
{"pci_address", offsetof(struct rpc_construct_virtio_blk_dev, pci_address), spdk_json_decode_string },
{"name", offsetof(struct rpc_construct_virtio_blk_dev, name), spdk_json_decode_string },

View File

@ -1779,20 +1779,6 @@ Format: 'user:u1 secret:s1 muser:mu1 msecret:ms1,user:u2 secret:s2 muser:mu2 mse
p.add_argument('name', help='Virtio device name. E.g. VirtioUser0')
p.set_defaults(func=remove_virtio_bdev)
def construct_virtio_user_blk_bdev(args):
print(rpc.vhost.construct_virtio_user_blk_bdev(args.client,
path=args.path,
name=args.name,
vq_count=args.vq_count,
vq_size=args.vq_size))
p = subparsers.add_parser('construct_virtio_user_blk_bdev', help='Connect to a virtio user blk device.')
p.add_argument('path', help='Path to Virtio BLK socket')
p.add_argument('name', help='Name for the bdev')
p.add_argument('--vq-count', help='Number of virtual queues to be used.', type=int)
p.add_argument('--vq-size', help='Size of each queue', type=int)
p.set_defaults(func=construct_virtio_user_blk_bdev)
def construct_virtio_pci_blk_bdev(args):
print(rpc.vhost.construct_virtio_pci_blk_bdev(args.client,
pci_address=args.pci_address,

View File

@ -180,25 +180,6 @@ def get_virtio_scsi_devs(client):
return client.call('get_virtio_scsi_devs')
def construct_virtio_user_blk_bdev(client, path, name, vq_count=None, vq_size=None):
"""Connect to virtio user BLK device.
Args:
path: path to Virtio BLK socket
name: use this name as base instead of 'VirtioScsiN'
vq_count: number of virtual queues to be used
vq_size: size of each queue
"""
params = {
'path': path,
'name': name,
}
if vq_count:
params['vq_count'] = vq_count
if vq_size:
params['vq_size'] = vq_size
return client.call('construct_virtio_user_blk_bdev', params)
def construct_virtio_pci_blk_bdev(client, pci_address, name):
"""Create a Virtio Blk device from a virtio-pci device.
Args: