[libvirt] [PATCH] qemu: fallback to HMP drive_add/drive_del
Eric Blake
eblake at redhat.com
Fri Mar 11 16:56:42 UTC 2011
On 03/11/2011 08:05 AM, Jiri Denemark wrote:
>> + if (qemuMonitorJSONHasError(reply, "CommandNotFound")) {
>> + VIR_DEBUG0(_("drive_del command not found, trying HMP"));
>> + ret = qemuMonitorTextDriveDel(mon, drivestr);
>> + } else if (qemuMonitorJSONHasError(reply, "DeviceNotFound")) {
>> + /* NB: device not found errors mean the drive was
>> + * auto-deleted and we ignore the error */
>> + ret = 0;
>> + } else {
>> + ret = qemuMonitorJSONCheckError(cmd, reply);
>> }
>
> Looks good, although I think we should issue the "deleting disk is not
> supported. This may leak data if disk is reassigned" error also in case
> human-monitor-command is not supported. But that will need some more work on
> the HMP infrastructure since it's not possible to get this from
> qemuMonitorText* function that we call.
Do we want to push this now, or get the infrastructure improvements in
first?
--
Eric Blake eblake at redhat.com +1-801-349-2682
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20110311/41928231/attachment-0001.sig>
More information about the libvir-list
mailing list