@@ -1656,8 +1656,8 @@ int bdrv_is_allocated(BlockDriverState *bs, int64_t sector_num, int nb_sectors,
return bs->drv->bdrv_is_allocated(bs, sector_num, nb_sectors, pnum);
}
-void bdrv_mon_event(const BlockDriverState *bdrv,
- BlockMonEventAction action, int is_read)
+void bdrv_error_mon_event(const BlockDriverState *bdrv,
+ BlockMonEventAction action, int is_read)
{
QObject *data;
const char *action_str;
@@ -50,8 +50,8 @@ typedef enum {
BDRV_ACTION_REPORT, BDRV_ACTION_IGNORE, BDRV_ACTION_STOP
} BlockMonEventAction;
-void bdrv_mon_event(const BlockDriverState *bdrv,
- BlockMonEventAction action, int is_read);
+void bdrv_error_mon_event(const BlockDriverState *bdrv,
+ BlockMonEventAction action, int is_read);
void bdrv_info_print(Monitor *mon, const QObject *data);
void bdrv_info(Monitor *mon, QObject **ret_data);
void bdrv_stats_print(Monitor *mon, const QObject *data);
@@ -440,7 +440,7 @@ static int ide_handle_rw_error(IDEState *s, int error, int op)
BlockErrorAction action = bdrv_get_on_error(s->bs, is_read);
if (action == BLOCK_ERR_IGNORE) {
- bdrv_mon_event(s->bs, BDRV_ACTION_IGNORE, is_read);
+ bdrv_error_mon_event(s->bs, BDRV_ACTION_IGNORE, is_read);
return 0;
}
@@ -448,7 +448,7 @@ static int ide_handle_rw_error(IDEState *s, int error, int op)
|| action == BLOCK_ERR_STOP_ANY) {
s->bus->dma->ops->set_unit(s->bus->dma, s->unit);
s->bus->dma->ops->add_status(s->bus->dma, op);
- bdrv_mon_event(s->bs, BDRV_ACTION_STOP, is_read);
+ bdrv_error_mon_event(s->bs, BDRV_ACTION_STOP, is_read);
vm_stop(VMSTOP_DISKFULL);
} else {
if (op & BM_STATUS_DMA_RETRY) {
@@ -457,7 +457,7 @@ static int ide_handle_rw_error(IDEState *s, int error, int op)
} else {
ide_rw_error(s);
}
- bdrv_mon_event(s->bs, BDRV_ACTION_REPORT, is_read);
+ bdrv_error_mon_event(s->bs, BDRV_ACTION_REPORT, is_read);
}
return 1;
@@ -231,7 +231,7 @@ static int scsi_handle_rw_error(SCSIDiskReq *r, int error, int type)
BlockErrorAction action = bdrv_get_on_error(s->bs, is_read);
if (action == BLOCK_ERR_IGNORE) {
- bdrv_mon_event(s->bs, BDRV_ACTION_IGNORE, is_read);
+ bdrv_error_mon_event(s->bs, BDRV_ACTION_IGNORE, is_read);
return 0;
}
@@ -241,7 +241,7 @@ static int scsi_handle_rw_error(SCSIDiskReq *r, int error, int type)
type &= SCSI_REQ_STATUS_RETRY_TYPE_MASK;
r->status |= SCSI_REQ_STATUS_RETRY | type;
- bdrv_mon_event(s->bs, BDRV_ACTION_STOP, is_read);
+ bdrv_error_mon_event(s->bs, BDRV_ACTION_STOP, is_read);
vm_stop(VMSTOP_DISKFULL);
} else {
if (type == SCSI_REQ_STATUS_RETRY_READ) {
@@ -249,7 +249,7 @@ static int scsi_handle_rw_error(SCSIDiskReq *r, int error, int type)
}
scsi_command_complete(r, CHECK_CONDITION,
HARDWARE_ERROR);
- bdrv_mon_event(s->bs, BDRV_ACTION_REPORT, is_read);
+ bdrv_error_mon_event(s->bs, BDRV_ACTION_REPORT, is_read);
}
return 1;
@@ -69,7 +69,7 @@ static int virtio_blk_handle_rw_error(VirtIOBlockReq *req, int error,
VirtIOBlock *s = req->dev;
if (action == BLOCK_ERR_IGNORE) {
- bdrv_mon_event(s->bs, BDRV_ACTION_IGNORE, is_read);
+ bdrv_error_mon_event(s->bs, BDRV_ACTION_IGNORE, is_read);
return 0;
}
@@ -77,11 +77,11 @@ static int virtio_blk_handle_rw_error(VirtIOBlockReq *req, int error,
|| action == BLOCK_ERR_STOP_ANY) {
req->next = s->rq;
s->rq = req;
- bdrv_mon_event(s->bs, BDRV_ACTION_STOP, is_read);
+ bdrv_error_mon_event(s->bs, BDRV_ACTION_STOP, is_read);
vm_stop(VMSTOP_DISKFULL);
} else {
virtio_blk_req_complete(req, VIRTIO_BLK_S_IOERR);
- bdrv_mon_event(s->bs, BDRV_ACTION_REPORT, is_read);
+ bdrv_error_mon_event(s->bs, BDRV_ACTION_REPORT, is_read);
}
return 1;
Rename it to bdrv_error_mon_event() in order to better communicate its purpose. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> --- block.c | 4 ++-- block.h | 4 ++-- hw/ide/core.c | 6 +++--- hw/scsi-disk.c | 6 +++--- hw/virtio-blk.c | 6 +++--- 5 files changed, 13 insertions(+), 13 deletions(-)