Re: [Qemu-devel] [PATCH 3/3] block: allow BLOCK_IMAGE_CORRUPTED to have a node name

2015-03-20 Thread Alberto Garcia
On Thu, Mar 19, 2015 at 05:14:24PM -0600, Eric Blake wrote: 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

Re: [Qemu-devel] [PATCH 3/3] block: allow BLOCK_IMAGE_CORRUPTED to have a node name

2015-03-19 Thread Eric Blake
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

Re: [Qemu-devel] [PATCH 3/3] block: allow BLOCK_IMAGE_CORRUPTED to have a node name

2015-03-19 Thread Eric Blake
On 03/19/2015 03:42 PM, Alberto Garcia wrote: (I forgot to Cc Eric in this series, doing it now) 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

Re: [Qemu-devel] [PATCH 3/3] block: allow BLOCK_IMAGE_CORRUPTED to have a node name

2015-03-19 Thread Alberto Garcia
On Thu, Mar 19, 2015 at 04:15:49PM -0600, Eric Blake wrote: -# @device: device name +# @device: device name, or node name if not present I think just adding a @node-name field and keeping @device as it is should be good enough here. I was doing the same that we discussed for

Re: [Qemu-devel] [PATCH 3/3] block: allow BLOCK_IMAGE_CORRUPTED to have a node name

2015-03-19 Thread Alberto Garcia
On Thu, Mar 19, 2015 at 05:52:52PM -0400, Max Reitz wrote: So in this case here I don't really see a benefit of reusing @device instead of just adding @node-name, whereas adding @node-name will have the benefit of not affecting anybody and (in my opinion) being more explicit. However, if

Re: [Qemu-devel] [PATCH 3/3] block: allow BLOCK_IMAGE_CORRUPTED to have a node name

2015-03-19 Thread Max Reitz
On 2015-03-19 at 11:43, Alberto Garcia wrote: Since this event can occur in nodes that don't have a device name associated, use the node name as fallback in those cases. Signed-off-by: Alberto Garcia be...@igalia.com --- block/qcow2.c | 5 +++-- docs/qmp/qmp-events.txt | 2 +-

Re: [Qemu-devel] [PATCH 3/3] block: allow BLOCK_IMAGE_CORRUPTED to have a node name

2015-03-19 Thread Alberto Garcia
(I forgot to Cc Eric in this series, doing it now) 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

Re: [Qemu-devel] [PATCH 3/3] block: allow BLOCK_IMAGE_CORRUPTED to have a node name

2015-03-19 Thread Max Reitz
On 2015-03-19 at 17:42, Alberto Garcia wrote: (I forgot to Cc Eric in this series, doing it now) 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

[Qemu-devel] [PATCH 3/3] block: allow BLOCK_IMAGE_CORRUPTED to have a node name

2015-03-19 Thread Alberto Garcia
Since this event can occur in nodes that don't have a device name associated, use the node name as fallback in those cases. Signed-off-by: Alberto Garcia be...@igalia.com --- block/qcow2.c | 5 +++-- docs/qmp/qmp-events.txt | 2 +- qapi/block-core.json| 2 +- 3 files changed, 5