From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50594) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YYjeg-0002nv-Hy for qemu-devel@nongnu.org; Thu, 19 Mar 2015 19:15:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YYjed-0006qo-5V for qemu-devel@nongnu.org; Thu, 19 Mar 2015 19:15:10 -0400 Received: from mx1.redhat.com ([209.132.183.28]:36051) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YYjec-0006nm-UY for qemu-devel@nongnu.org; Thu, 19 Mar 2015 19:15:07 -0400 Message-ID: <550B5850.5010303@redhat.com> Date: Thu, 19 Mar 2015 17:14:24 -0600 From: Eric Blake MIME-Version: 1.0 References: <9d3f0e0ee6fcfc6300e165f79b46a4af0ffdc37d.1426779661.git.berto@igalia.com> <550B26AB.4050806@redhat.com> <20150319214201.GA11212@igalia.com> <550B4A95.9060501@redhat.com> <20150319223840.GA13196@igalia.com> In-Reply-To: <20150319223840.GA13196@igalia.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="HW0XbHke5T7rk3hX8Ckeq2U7W9qMUJP6I" 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 Cc: Kevin Wolf , qemu-devel@nongnu.org, Stefan Hajnoczi , Max Reitz This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --HW0XbHke5T7rk3hX8Ckeq2U7W9qMUJP6I Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 03/19/2015 04:38 PM, Alberto Garcia wrote: >> 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 > Yes, it is perfectly possible. I guess any software that wants to > handle those scenarios probably wants to give names to all nodes. >=20 > From the QEMU side, apart from giving automatic names to all nodes I > don't see any other solution. In the context of block commit, libvirt found that reporting device name to the end user was nicer than file name (since there are two events emitted - one when the active layer has become synced with the lower layer, and therefore where the node associated with device is still 'top'; and the other when the active layer has pivoted to the base layer and top is no longer valid, therefore where the node associated with device is now 'base' - since the two events are related but have different file [node] names, having the device name made life easier). But note that we still haven't exposed 'node' information in any of the block job events (BLOCK_JOB_COMPLETED, BLOCK_JOB_CANCELLED, BLOCK_JOB_ERROR), and it might still make sense to do so, even if libvirt doesn't need to expose those node names on to the end user. But this is a counter-example - knowing just the device name does NOT tell you which node is corrupted, if there is any possibility of a snapshot or active commit changing the active node associated with the device. That's because there might be a race between the event announcing corruption and some other action modifying the chain, such that the client's notion of the active element of the chain is different from the active element at the time the event was reported. So the more I think about it, the more I'd like for this event to output both 'device' (mandatory, with an empty string if we can't easily tie the BDS to a single device) and 'node' (where 'node' can be optional, and omitted if the BDS does not have a node name [if we ever add generated node names, then we could make 'node' mandatory at that time]).= --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --HW0XbHke5T7rk3hX8Ckeq2U7W9qMUJP6I 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/ iQEcBAEBCAAGBQJVC1hQAAoJEKeha0olJ0Nqb0oH/2FKsK1qDSiDH53xPwAhr8ti T8ntz9vPWVS6VqHQULIFfOcwXfMVEgTCvQiBKuQ2fJlWH6n+zsMrhVP3deBQMt6w G9ZX9r6NkX8AMuXzGaVeiFUOnTKqWbGDGbfztw+shA66sSH99MID1lYTXFKUApm2 5ltIzzPHIfVDBxnSl3mwFfvDHkszFngwOwb+vk6uBqVQWlTcVZR+HLPJDqcUAfC5 8+ISlp0JATeS/XP+u8pl5jP5o24ExQ+X9+31X5aiMd1u4Axt2JgIrGtgDBmbagbT IrRAJ0EG+eVyKzoNfQehBOhAtfn7GycM0hX1ot9RhX0P6gKxKCTrTUdG1ZJ5le4= =wss9 -----END PGP SIGNATURE----- --HW0XbHke5T7rk3hX8Ckeq2U7W9qMUJP6I--