qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v5 2/3] qmp event: Refactor QUORUM_REPORT_BAD


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH v5 2/3] qmp event: Refactor QUORUM_REPORT_BAD
Date: Wed, 24 Feb 2016 09:57:15 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0

On 02/24/2016 05:35 AM, Alberto Garcia wrote:

>> +    switch (type) {
>> +    case QUORUM_OP_TYPE_READ:
>> +    case QUORUM_OP_TYPE_WRITE:
>> +        qapi_event_send_quorum_report_bad(false, 0, !!msg, msg, node_name,
>> +                                          acb->sector_num, acb->nb_sectors,
>> +                                          &error_abort);
>> +        break;
>> +    case QUORUM_OP_TYPE_FLUSH:
>> +        qapi_event_send_quorum_report_bad(true, type, !!msg, msg, node_name,
>> +                                          0, 0, &error_abort);
>> +        break;
> 
> A few comments:
> 
>   - Why don't you set the 'type' field in read and write operations? You
>     defined all three values but you are only using 'flush' here.

In fact, 'type' does not need to be optional; always outputting it makes
more sense for new clients, and doesn't hurt old clients.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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