From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43313) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YfzTW-0003D5-NB for qemu-devel@nongnu.org; Wed, 08 Apr 2015 19:33:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YfzTV-0003Ks-Dx for qemu-devel@nongnu.org; Wed, 08 Apr 2015 19:33:38 -0400 Message-ID: <5525BA9F.4070406@redhat.com> Date: Wed, 08 Apr 2015 17:32:47 -0600 From: Eric Blake MIME-Version: 1.0 References: <147cec5b3594f4bec0cb41c98afe5fcbfb67567c.1428485266.git.berto@igalia.com> In-Reply-To: <147cec5b3594f4bec0cb41c98afe5fcbfb67567c.1428485266.git.berto@igalia.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 3/3] block: add 'node-name' field to BLOCK_IMAGE_CORRUPTED List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alberto Garcia , qemu-devel@nongnu.org Cc: Kevin Wolf , qemu-block@nongnu.org, Markus Armbruster , Stefan Hajnoczi , Max Reitz On 04/08/2015 03:29 AM, Alberto Garcia wrote: > Since this event can occur in nodes that cannot have a device name > associated, include also a field with the node name. > > Signed-off-by: Alberto Garcia > --- > block/qcow2.c | 8 ++++++-- > docs/qmp/qmp-events.txt | 21 +++++++++++++-------- > qapi/block-core.json | 17 +++++++++++------ > 3 files changed, 30 insertions(+), 16 deletions(-) > > > -- "device": Device name (json-string) > -- "msg": Informative message (e.g., reason for the corruption) (json-string) > -- "offset": If the corruption resulted from an image access, this is the access > - offset into the image (json-int) > -- "size": If the corruption resulted from an image access, this is the access > - size (json-int) > +- "device": Device name (json-string) > +- "node-name": Node name (json-string, optional) > +- "msg": Informative message (e.g., reason for the corruption) > + (json-string) > +- "offset": If the corruption resulted from an image access, this > + is the access offset into the image (json-int) > +- "size": If the corruption resulted from an image access, this > + is the access size (json-int) Not your fault (so don't worry about fixing it here), but I still find this definition of 'offset' confusing - is it the guest's offset, or the host's offset? I'm going to assume the host's offset (remember, on qcow2, the guest offset 0 is never at host offset 0, because that is reserved for the qcow2 header - but we CAN encounter a read error while reading the qcow2 header). Reviewed-by: Eric Blake -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org