vm-virtio: vhost-user-blk: Expect an identifier upon device creation

This identifier is chosen from the DeviceManager so that it will manage
all identifiers across the VM, which will ensure uniqueness.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
Sebastien Boeuf
2020-04-27 13:56:26 +02:00
committed by Rob Bradford
parent bb7fa71fcb
commit 46e0b3ff75
2 changed files with 9 additions and 3 deletions

View File

@@ -1201,7 +1201,7 @@ impl DeviceManager {
queue_size: disk_cfg.queue_size,
};
let vhost_user_block_device = Arc::new(Mutex::new(
vm_virtio::vhost_user::Blk::new(disk_cfg.wce, vu_cfg)
vm_virtio::vhost_user::Blk::new(id, disk_cfg.wce, vu_cfg)
.map_err(DeviceManagerError::CreateVhostUserBlk)?,
));