From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36201) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YYijM-0001EG-Hn for qemu-devel@nongnu.org; Thu, 19 Mar 2015 18:16:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YYijI-0002ip-0v for qemu-devel@nongnu.org; Thu, 19 Mar 2015 18:15:56 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41637) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YYijH-0002ik-Po for qemu-devel@nongnu.org; Thu, 19 Mar 2015 18:15:51 -0400 Message-ID: <550B4A95.9060501@redhat.com> Date: Thu, 19 Mar 2015 16:15:49 -0600 From: Eric Blake MIME-Version: 1.0 References: <9d3f0e0ee6fcfc6300e165f79b46a4af0ffdc37d.1426779661.git.berto@igalia.com> <550B26AB.4050806@redhat.com> <20150319214201.GA11212@igalia.com> In-Reply-To: <20150319214201.GA11212@igalia.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="mwHhK1d4a736xqQVmuEaDHBvXVuOS6sH3" Subject: Re: [Qemu-devel] [PATCH 3/3] block: allow BLOCK_IMAGE_CORRUPTED to have a node name List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alberto Garcia , Max Reitz Cc: Kevin Wolf , qemu-devel@nongnu.org, Stefan Hajnoczi This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --mwHhK1d4a736xqQVmuEaDHBvXVuOS6sH3 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 03/19/2015 03:42 PM, Alberto Garcia wrote: > (I forgot to Cc Eric in this series, doing it now) >=20 > On Thu, Mar 19, 2015 at 03:42:35PM -0400, Max Reitz wrote: >>> # Emitted when a corruption has been detected in a disk image >>> # >>> -# @device: device name >>> +# @device: device name, or node name if not present >> >> Normally, if a field in QMP is designed @device, it contains a >> device name. We do have combined device/node name fields, though (as >> of John's incremental backup series, at least), but those are named >> @node (which I proposed for patch 2, too). >> >> But renaming the field here will lead to breaking backwards >> compatibility. I think just adding a @node-name field and keeping >> @device as it is should be good enough here. >=20 > I was doing the same that we discussed for BlockJobInfo here, where > option b) seemed to have a bit more support: >=20 > https://lists.gnu.org/archive/html/qemu-devel/2015-03/msg03651.html >=20 > But yeah I personally don't mind extending the event with a new field. > Would we make 'device' optional in this case? How hard is it to output both 'device' and 'node' in the same event, if both are available? And does it add anything? I could live with the simplicity of just returning a device name where we have one (back-compat for older clients that only ever start jobs on a device) and a node name where we don't (such an event can only be triggered by a job started by a client new enough to know how to start a job by node name), and just always use the 'device' field while documenting that it is not the best field name for what its contents represent. On the other hand, if libvirt starts using node names everywhere, then returning a device name instead of a node name makes libvirt have to do a bit more work to map a device name down to a node name (not the end of the world, because the device name is still unambiguous); whereas returning both device AND node name at once may make libvirt's life easie= r. And for this particular event, which is not tied to block jobs but to generic block operation, isn't it possible that we could be reporting a corrupted backing chain where we have neither a device name (it is not the active layer) nor a node name (if we don't add Jeff's patch to auto-name all nodes)? In such a case, I don't know that we can do much better anyways. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --mwHhK1d4a736xqQVmuEaDHBvXVuOS6sH3 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJVC0qVAAoJEKeha0olJ0Nq+OoH/3yY8qzstxt5CpSNUkt1MS6G ikBOMljPiw30rNBAjRmd4HJA5A172S+WhgqAvLkACPQTWO2wIMlzCIhcfAWiMgtx atOHctXp7Zez8s/rE4rCyqcImqizMzW+pKkrQbvJqNmncjVfq91BR5cUNIszWtMK 9qnQ2MCjPmMWnTNCZVvKYEHwFk00ilbYlvEy0Mx7NWRfJRNDDbYs/sLw8gVtKoEt U6Kd+IAuepvB2B6ePyBdNEPUTkCyE5rz/RgTcu8d3QLbM0e6AeRATZTqpH7L+zol H9lFUGEBbFXkE02sXPm32aIE2sbMxnd+St35lG0bQ49OogZ5po0aJgVJ9dRUBbE= =vEx2 -----END PGP SIGNATURE----- --mwHhK1d4a736xqQVmuEaDHBvXVuOS6sH3--