From: Luiz Capitulino <lcapitulino@redhat.com>
To: qemu-devel@nongnu.org
Cc: kwolf@redhat.com, amit.shah@redhat.com, aliguori@us.ibm.com,
armbru@redhat.com
Subject: [Qemu-devel] [PATCH 1/3] block: Rename bdrv_mon_event()
Date: Fri, 27 May 2011 16:31:50 -0300 [thread overview]
Message-ID: <1306524712-13050-2-git-send-email-lcapitulino@redhat.com> (raw)
In-Reply-To: <1306524712-13050-1-git-send-email-lcapitulino@redhat.com>
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(-)
diff --git a/block.c b/block.c
index effa86f..f5014cf 100644
--- a/block.c
+++ b/block.c
@@ -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;
diff --git a/block.h b/block.h
index da7d39c..1f58eab 100644
--- a/block.h
+++ b/block.h
@@ -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);
diff --git a/hw/ide/core.c b/hw/ide/core.c
index 45410e8..96c153e 100644
--- a/hw/ide/core.c
+++ b/hw/ide/core.c
@@ -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;
diff --git a/hw/scsi-disk.c b/hw/scsi-disk.c
index 397b9d6..687d34c 100644
--- a/hw/scsi-disk.c
+++ b/hw/scsi-disk.c
@@ -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;
diff --git a/hw/virtio-blk.c b/hw/virtio-blk.c
index 91e0394..99db00a 100644
--- a/hw/virtio-blk.c
+++ b/hw/virtio-blk.c
@@ -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;
--
1.7.4.4
next prev parent reply other threads:[~2011-05-27 19:32 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-27 19:31 [Qemu-devel] [PATCH 0/3]: QMP: Introduce the BLOCK_MEDIA_EJECT event Luiz Capitulino
2011-05-27 19:31 ` Luiz Capitulino [this message]
2011-05-27 19:31 ` [Qemu-devel] [PATCH 2/3] QMP: Add BLOCK_MEDIA_EJECT event documentation Luiz Capitulino
2011-05-30 8:46 ` Kevin Wolf
2011-05-30 14:21 ` Luiz Capitulino
2011-05-30 14:54 ` Markus Armbruster
2011-05-31 7:09 ` Amit Shah
2011-05-31 7:59 ` Kevin Wolf
2011-05-27 19:31 ` [Qemu-devel] [PATCH 3/3] QMP: Introduce the BLOCK_MEDIA_EJECT event Luiz Capitulino
2011-05-28 7:58 ` Markus Armbruster
2011-05-30 14:09 ` Luiz Capitulino
2011-05-30 14:49 ` Markus Armbruster
2011-05-31 8:12 ` Kevin Wolf
2011-05-31 13:35 ` Luiz Capitulino
2011-05-31 13:40 ` Anthony Liguori
-- strict thread matches above, loose matches on Subject: below --
2011-01-12 18:22 [Qemu-devel] [RFC 0/3]: QMP: Introduce " Luiz Capitulino
2011-01-12 18:22 ` [Qemu-devel] [PATCH 1/3] block: Rename bdrv_mon_event() Luiz Capitulino
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1306524712-13050-2-git-send-email-lcapitulino@redhat.com \
--to=lcapitulino@redhat.com \
--cc=aliguori@us.ibm.com \
--cc=amit.shah@redhat.com \
--cc=armbru@redhat.com \
--cc=kwolf@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).