block: BLOCK_IO_ERROR QMP event
authorLuiz Capitulino <lcapitulino@redhat.com>
Wed, 3 Feb 2010 14:41:01 +0000 (12:41 -0200)
committerAnthony Liguori <aliguori@us.ibm.com>
Wed, 10 Feb 2010 17:57:03 +0000 (11:57 -0600)
commitdfb346a74dcfde7eb952c10151cbf1649d9a7496
treed8a6d114af8c3b9b81fbe8d4f784367c50b33269
parent704dbaf9596e1791c8896eab7216214bc9de6439
block: BLOCK_IO_ERROR QMP event

This commit introduces the bdrv_mon_event() function, which
should be called by block subsystems (eg. IDE) when a I/O
error occurs, so that an QMP event is emitted.

The following information is currently provided in the event:

- device name
- operation (ie. "read" or "write")
- action taken (eg. "stop")

Event example:

{ "event": "BLOCK_IO_ERROR",
    "data": { "device": "ide0-hd1",
              "operation": "write",
              "action": "stop" },
    "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
block.c
block.h