mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-22 09:49:35 +00:00
runtime-rs: Support share-rw=true when hotplug block device within qemu
Support for the share-rw=true parameter has been added. While this parameter is essential for maintaining data consistency across multiple QEMU instances sharing a backend disk image, its implementation also serves to standardize parameters with the block device hotplug functionality in kata-runtime/qemu. Signed-off-by: Alex Lyn <alex.lyn@antgroup.com>
This commit is contained in:
parent
f1a9286916
commit
497bac6bd0
@ -683,6 +683,7 @@ impl Qmp {
|
||||
// add SCSI frontend device
|
||||
blkdev_add_args.insert("scsi-id".to_string(), scsi_id.into());
|
||||
blkdev_add_args.insert("lun".to_string(), lun.into());
|
||||
blkdev_add_args.insert("share-rw".to_string(), true.into());
|
||||
|
||||
self.qmp
|
||||
.execute(&qmp::device_add {
|
||||
@ -703,6 +704,7 @@ impl Qmp {
|
||||
} else {
|
||||
let (bus, slot) = self.find_free_slot()?;
|
||||
blkdev_add_args.insert("addr".to_owned(), format!("{:02}", slot).into());
|
||||
blkdev_add_args.insert("share-rw".to_string(), true.into());
|
||||
|
||||
self.qmp
|
||||
.execute(&qmp::device_add {
|
||||
|
Loading…
Reference in New Issue
Block a user