ac = is_read ? IO_OPERATION_TYPE_READ : IO_OPERATION_TYPE_WRITE;
qapi_event_send_block_io_error(bdrv_get_device_name(bs), ac, action,
bdrv_iostatus_is_enabled(bs),
- error == ENOSPC, &error_abort);
+ error == ENOSPC, strerror(error),
+ &error_abort);
}
/* This is done by device models because, while the block layer knows
# io-status is present, please see query-block documentation
# for more information (since: 2.2)
#
+# @reason: human readable string describing the error cause.
+# (This field is a debugging aid for humans, it should not
+# be parsed by applications) (since: 2.2)
+#
# Note: If action is "stop", a STOP event will eventually follow the
# BLOCK_IO_ERROR event
#
##
{ 'event': 'BLOCK_IO_ERROR',
'data': { 'device': 'str', 'operation': 'IoOperationType',
- 'action': 'BlockErrorAction', '*nospace': 'bool' } }
+ 'action': 'BlockErrorAction', '*nospace': 'bool',
+ 'reason': 'str' } }
##
# @BLOCK_JOB_COMPLETED