vhost-blk: use device name for VIRTIO_BLK_T_GET_ID
Block device product name is same among same type of the block devices, while Guest VM may use this value to generate UUID, so here we change it to block device name instead. Change-Id: I58c5fb271a6a436c15520616c2065eee9c37300a Signed-off-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7996 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
parent
43aca60458
commit
75a507736b
@ -609,7 +609,7 @@ process_blk_request(struct spdk_vhost_blk_task *task,
|
||||
return -1;
|
||||
}
|
||||
task->used_len = spdk_min((size_t)VIRTIO_BLK_ID_BYTES, task->iovs[1].iov_len);
|
||||
spdk_strcpy_pad(task->iovs[1].iov_base, spdk_bdev_get_product_name(bvdev->bdev),
|
||||
spdk_strcpy_pad(task->iovs[1].iov_base, spdk_bdev_get_name(bvdev->bdev),
|
||||
task->used_len, ' ');
|
||||
blk_request_finish(true, task);
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user