This is in preparation for the qemu-storage-daemon, so that it can apply the same setting for the export.
Signed-off-by: Fiona Ebner <[email protected]> Reviewed-by: Daniel Kral <[email protected]> Tested-by: Daniel Kral <[email protected]> --- src/PVE/QemuServer/BlockJob.pm | 2 +- src/PVE/QemuServer/Blockdev.pm | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/PVE/QemuServer/BlockJob.pm b/src/PVE/QemuServer/BlockJob.pm index 506010e1..c89994db 100644 --- a/src/PVE/QemuServer/BlockJob.pm +++ b/src/PVE/QemuServer/BlockJob.pm @@ -480,7 +480,7 @@ sub blockdev_mirror { # Note that if 'aio' is not explicitly set, i.e. default, it can change if source and target # don't both allow or both not allow 'io_uring' as the default. - my $target_node_name = + my ($target_node_name) = PVE::QemuServer::Blockdev::attach($storecfg, $vmid, $dest_drive, $attach_dest_opts); $jobs = {} if !$jobs; diff --git a/src/PVE/QemuServer/Blockdev.pm b/src/PVE/QemuServer/Blockdev.pm index f3fa73a5..26e9c383 100644 --- a/src/PVE/QemuServer/Blockdev.pm +++ b/src/PVE/QemuServer/Blockdev.pm @@ -528,10 +528,10 @@ my sub blockdev_add { =head3 attach - my $node_name = attach($storecfg, $id, $drive, $options); + my ($node_name, $read_only) = attach($storecfg, $id, $drive, $options); Attach the drive C<$drive> to the VM C<$id> considering the additional options C<$options>. -Returns the node name of the (topmost) attached block device node. +Returns the node name of the (topmost) attached block device node and whether the node is read-only. Parameters: @@ -615,7 +615,7 @@ sub attach { die $err; } - return $blockdev->{'node-name'}; + return ($blockdev->{'node-name'}, $blockdev->{'read-only'}); } =pod -- 2.47.3 _______________________________________________ pve-devel mailing list [email protected] https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
