From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41456) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zz5Ye-0005BK-2B for qemu-devel@nongnu.org; Wed, 18 Nov 2015 11:26:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zz5Yc-0003bU-VV for qemu-devel@nongnu.org; Wed, 18 Nov 2015 11:26:08 -0500 References: <1447836791-369-1-git-send-email-eblake@redhat.com> <1447836791-369-20-git-send-email-eblake@redhat.com> <874mgjvbtq.fsf@blackfin.pond.sub.org> <20151118120848.GB4817@noname.str.redhat.com> From: Eric Blake Message-ID: <564CA699.4000407@redhat.com> Date: Wed, 18 Nov 2015 09:26:01 -0700 MIME-Version: 1.0 In-Reply-To: <20151118120848.GB4817@noname.str.redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="bgPcnq16Vv1EA2njmGMopNjO7kB4a8PgA" Subject: Re: [Qemu-devel] [PATCH v12 19/36] blkdebug: Merge hand-rolled and qapi BlkdebugEvent enum List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf , Markus Armbruster Cc: qemu-devel@nongnu.org, "open list:Block layer core" This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --bgPcnq16Vv1EA2njmGMopNjO7kB4a8PgA Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 11/18/2015 05:08 AM, Kevin Wolf wrote: > Am 18.11.2015 um 11:30 hat Markus Armbruster geschrieben: >> Eric Blake writes: >> >>> No need to keep two separate enums, where editing one is likely >>> to forget the other. Now that we can specify a qapi enum prefix, >>> we don't even have to change the bulk of the uses. >>> >>> ## >>> -{ 'enum': 'BlkdebugEvent', >>> +{ 'enum': 'BlkdebugEvent', 'prefix': 'BLKDBG', >>> 'data': [ 'l1_update', 'l1_grow.alloc_table', 'l1_grow.write_table= ', >>> 'l1_grow.activate_table', 'l2_load', 'l2_update', >>> 'l2_update_compressed', 'l2_alloc.cow_read', 'l2_alloc.w= rite', >> >> I'm no friend of the 'prefix' feature. You could avoid it here by >> renaming BlkdebugEvent to Blkdbg. No additional churn, because you >> already replace hand-written BlkDebugEvent by generated BlkdebugEvent.= >> >> Alternatively, you could reduce churn by renaming it to BlkDebugEvent.= >> >> Matter of taste. Perhaps Kevin has a preference. >=20 > Wouldn't that mean that we end up with a C type called Blkdbg? In my > opinion that's a bit unspecific, so if you ask me, I would paint my > bikeshed in a different colour. Most of the existing qapi names are Blkdebug, it was only the internal enum being replaced that used BlkDebug. Also, qapi would munge BlkDebug into BLK_DEBUG, so I think we want to stick with the lowercase 'd' so that the munging (without 'prefix') would stick to BLKDEBUG. I'm also fine if you want me to do a followup patch that renames all enums from BLKDBG_L1_UPDATE to BLKDEBUG_EVENT_L1_UPDATE, at which point we could drop the 'prefix' (I don't know how many lines it would make long enough to need different wrapping, but modulo wrapping it would all be a mechanically scripted change). I don't have a favorite color in this painting match, so let me know yours :) --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --bgPcnq16Vv1EA2njmGMopNjO7kB4a8PgA 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/ iQEcBAEBCAAGBQJWTKaZAAoJEKeha0olJ0NqgUEIAIokkAvvt9m4qQK9QrgKgUOA OcfbKZc4V1AtG5y+i/5LntIOneLlzDTFD8CMezE5UgUp5SR/+TGaFd+5ffN4i13r DYER7HRu/X5qdnwWM7y2YiW0Tq6I35ZMYl0NrCI4/lwMU9Jc0BPnZ7fgZuMkP0DN esm+D01WrjOZP3JrfQutXph08DcZOHx7vmGMylYGdpey/8GhM5L6GPIzwQYPDMMR 2yY1uwoZXRm1x9yqHdDz+2KS2um3GAbgc41Lq1TstJlo7JCxixigONZCSaG5rjl4 mCPio/o88OKFSGcMgJoTXOydoEZKCFTVndeRkHNGdwD1GxBlrI8J4pKPDmdA4jc= =uH4f -----END PGP SIGNATURE----- --bgPcnq16Vv1EA2njmGMopNjO7kB4a8PgA--