On 05.10.2016 11:26, Kevin Wolf wrote:
> The event currently only contains the BlockBackend name. However, with
> anonymous BlockBackends, this is always the empty string. Add the node
> name so that the user can still see which block device caused the event.
> 
> Signed-off-by: Kevin Wolf <kw...@redhat.com>
> ---
>  block/block-backend.c | 5 +++--
>  docs/qmp-events.txt   | 6 +++++-
>  qapi/block-core.json  | 8 ++++++--
>  3 files changed, 14 insertions(+), 5 deletions(-)

Reviewed-by: Max Reitz <mre...@redhat.com>

Although it is a bit weird to report the root node's name, because I'd
expect the I/O error to occur on the protocol layer and thus the event
to report the protocol node's name.

OTOH, I think it'd be rather difficult to either keep the information
from which node the error originated or to trace it back when we want to
report it (and the decision to report it is generally made on the root
node, so...).

Therefore, reporting it on the root node is probably the best we can do.

Would it make sense to add a short note to the documentation
(qmp-events.txt and block-core.json) that the node name reported is not
necessarily the node the I/O error originated from but may (and
generally is) instead be some node above it?

Max

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to