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
signature.asc
Description: OpenPGP digital signature