mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-19 08:28:19 +00:00
runtime-rs: Change the device_id with block device index
As block device index is an very important unique id of a block device and can indicate a block device which is equivalent to device_id. In case of index is required in calculating scsi LUN and reduce useless arguments within reusing `hotplug_block_device`, we'd better change the device_id with block device index. Signed-off-by: alex.lyn <alex.lyn@antgroup.com>
This commit is contained in:
parent
4521cae0c0
commit
e683a7fd37
@ -635,7 +635,7 @@ impl QemuInner {
|
||||
block_device.config.pci_path = qmp
|
||||
.hotplug_block_device(
|
||||
&self.config.blockdev_info.block_device_driver,
|
||||
&block_device.device_id,
|
||||
block_device.config.index,
|
||||
&block_device.config.path_on_host,
|
||||
&block_device.config.blkdev_aio.to_string(),
|
||||
block_device.config.is_direct,
|
||||
|
@ -519,7 +519,7 @@ impl Qmp {
|
||||
pub fn hotplug_block_device(
|
||||
&mut self,
|
||||
block_driver: &str,
|
||||
device_id: &str,
|
||||
device_id: u64,
|
||||
path_on_host: &str,
|
||||
blkdev_aio: &str,
|
||||
is_direct: Option<bool>,
|
||||
|
Loading…
Reference in New Issue
Block a user