From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50374) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aYcmw-0000YJ-7w for qemu-devel@nongnu.org; Wed, 24 Feb 2016 11:59:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aYcms-0006N2-7i for qemu-devel@nongnu.org; Wed, 24 Feb 2016 11:59:46 -0500 Received: from resqmta-po-10v.sys.comcast.net ([96.114.154.169]:48293) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aYcms-0006Mv-38 for qemu-devel@nongnu.org; Wed, 24 Feb 2016 11:59:42 -0500 References: <1456308715-15465-1-git-send-email-xiecl.fnst@cn.fujitsu.com> <1456308715-15465-3-git-send-email-xiecl.fnst@cn.fujitsu.com> From: Eric Blake Message-ID: <56CDE0EB.6040907@redhat.com> Date: Wed, 24 Feb 2016 09:57:15 -0700 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="oTE4Rv1r4vbrhx65uKHRX1tkr3aORfRlu" Subject: Re: [Qemu-devel] [PATCH v5 2/3] qmp event: Refactor QUORUM_REPORT_BAD List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alberto Garcia , Changlong Xie , qemu devel , Kevin Wolf , Max Reitz , Markus Armbruster Cc: "Dr. David Alan Gilbert" This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --oTE4Rv1r4vbrhx65uKHRX1tkr3aORfRlu Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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_se= ctors, >> + &error_abort); >> + break; >> + case QUORUM_OP_TYPE_FLUSH: >> + qapi_event_send_quorum_report_bad(true, type, !!msg, msg, nod= e_name, >> + 0, 0, &error_abort); >> + break; >=20 > A few comments: >=20 > - Why don't you set the 'type' field in read and write operations? Yo= u > 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. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --oTE4Rv1r4vbrhx65uKHRX1tkr3aORfRlu Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJWzeDrAAoJEKeha0olJ0NqQ18IAJu69KAhuxlI3r769TBtLk6L EfZVfiTeKo43HV947fF6U22trNkgV85WUfea/LPsKfikVJBhp6CibHb5Z+SBXcef TQV1dTjzQknUnx/9QAMv+7NeKemE3vGSLtx2mSQTgBAvnNxRPcDO4lNOs9e9ktOK XYxPeNlG+37102TrzBLcmxCVDCd846tCqYeOVMFwbmyz8gPOJ3964DMaq7ITh0Gc asmMSLLd4bCNnje4hQ25kXj+CVbfJB323YQHmkVp65c2JubeHKsZKvTeEPuMTv69 9QMBlwYBje0xLtwXm6D2/2XUyrY3ijkMb/L56LwPOTjDDWt5kBJWQf0YfhfaH5k= =A/Dm -----END PGP SIGNATURE----- --oTE4Rv1r4vbrhx65uKHRX1tkr3aORfRlu--