[Top][All Lists]

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

Re: [Qemu-block] [Qemu-devel] [PATCH v2 1/1] block: improve error handli

From: Max Reitz
Subject: Re: [Qemu-block] [Qemu-devel] [PATCH v2 1/1] block: improve error handling in raw_open
Date: Wed, 27 Jul 2016 16:33:31 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0

On 27.07.2016 14:59, Markus Armbruster wrote:
> Max Reitz <address@hidden> writes:
>> On 26.07.2016 19:18, Halil Pasic wrote:
> [...]
>>> Frankly, I'm a bit uncomfortable with asking (do not want to be pushy),
>>> but do you have an opinion on the 'error_report_err' issue (pointed
>>> out in the cover letter part)?
>> You are using drive_add with QMP? As far as I know, one can only do so
>> with human-monitor-command which returns the error string like so:
>> {"return": "Could not open file: No such file or directory\r\n"}
>> Apart from that, as for QMP, in theory you're supposed to use
>> blockdev-add
> In theory, we're supposed to have completed development of blockdev-add
> into a useful, supported interface...
>>              and device_add, I think (although blockdev-add is still
>> considered experimental...).
> ... but we haven't, and that's why libvirt isn't using it, and you
> shouldn't be using it, either.

Yes, you're right, of course. Anyway, I just tried to point out that
drive_add is not a QMP command (whereas blockdev-add is), so its error
reporting is rather awkward (in contrast to QMP's blockdev-add).

So the fact that drive_add's error reporting isn't very nice is not
because of drive_add itself but because of the fact that it's an HMP
command. The corresponding QMP command thus works just fine.


>>                              And blockdev-add will return the error
>> string like so:
>> {"error": {"class": "GenericError", "desc": "Could not open file: No
>> such file or directory"}}

Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]