mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 16:53:55 -06:00
block: Rename bdrv_mon_event() & BlockMonEventAction
They are QMP events, not monitor events. Rename them accordingly. Also, move bdrv_emit_qmp_error_event() up in the file. A new event will be added soon and it's good to have them next each other. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Acked-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
parent
235fe3bfd4
commit
329c0a48a9
5 changed files with 41 additions and 41 deletions
|
@ -233,14 +233,14 @@ static int scsi_handle_rw_error(SCSIDiskReq *r, int error)
|
|||
BlockErrorAction action = bdrv_get_on_error(s->qdev.conf.bs, is_read);
|
||||
|
||||
if (action == BLOCK_ERR_IGNORE) {
|
||||
bdrv_mon_event(s->qdev.conf.bs, BDRV_ACTION_IGNORE, is_read);
|
||||
bdrv_emit_qmp_error_event(s->qdev.conf.bs, BDRV_ACTION_IGNORE, is_read);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if ((error == ENOSPC && action == BLOCK_ERR_STOP_ENOSPC)
|
||||
|| action == BLOCK_ERR_STOP_ANY) {
|
||||
|
||||
bdrv_mon_event(s->qdev.conf.bs, BDRV_ACTION_STOP, is_read);
|
||||
bdrv_emit_qmp_error_event(s->qdev.conf.bs, BDRV_ACTION_STOP, is_read);
|
||||
vm_stop(RUN_STATE_IO_ERROR);
|
||||
bdrv_iostatus_set_err(s->qdev.conf.bs, error);
|
||||
scsi_req_retry(&r->req);
|
||||
|
@ -259,7 +259,7 @@ static int scsi_handle_rw_error(SCSIDiskReq *r, int error)
|
|||
scsi_check_condition(r, SENSE_CODE(IO_ERROR));
|
||||
break;
|
||||
}
|
||||
bdrv_mon_event(s->qdev.conf.bs, BDRV_ACTION_REPORT, is_read);
|
||||
bdrv_emit_qmp_error_event(s->qdev.conf.bs, BDRV_ACTION_REPORT, is_read);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue