Re: [PATCH] qemu: raise an error when trying to use readonly ide disks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Martin Kletzander <mkletzan@xxxxxxxxxx> writes:

> If the user updates from QEMU without DRIVE_READONLY to newer one,
> that supports that flag, than XML with readonly IDE HDD will stop
> working even though it worked before the update *as requested*.  That
> readonly flag does not reflect how the disk is exposed in the guest;
> as you said IDE does not have any readonly concept, that is only how
> the device reacts to writes.
>
> Changing the behaviour to:
>
> if (disk->readonly &&
>    virQEMUCapsGet(qemuCaps, QEMU_CAPS_DRIVE_READONLY) &&
>    !(disk->bus == VIR_DOMAIN_DISK_BUS_IDE &&
>      disk->device == VIR_DOMAIN_DISK_DEVICE_DISK))
>    virBufferAddLit(&opt, ",readonly=on");
>
>
> would keep the backward compatibility.  This behaviour makes more
> sense to me.

this behaves in a quite different way that my proposed patch but if
<readonly/> affects also the SELinux label and we allow the process to
run anyway by skipping readonly=on for IDE disks, wouldn't qemu fail in
weird ways when trying to write to the file?

Regards,
Giuseppe

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]