From: Luiz Capitulino <lcapitulino@redhat.com>
To: qemu-devel@nongnu.org
Cc: kwolf@redhat.com
Subject: [Qemu-devel] [PATCH 3/5] ide: Generate BLOCK_IO_ERROR QMP event
Date: Wed, 3 Feb 2010 12:41:02 -0200 [thread overview]
Message-ID: <1265208064-16039-4-git-send-email-lcapitulino@redhat.com> (raw)
In-Reply-To: <1265208064-16039-1-git-send-email-lcapitulino@redhat.com>
Just call bdrv_mon_event() in the right place.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
---
hw/ide/core.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/hw/ide/core.c b/hw/ide/core.c
index b6643e8..603e537 100644
--- a/hw/ide/core.c
+++ b/hw/ide/core.c
@@ -480,14 +480,17 @@ static int ide_handle_rw_error(IDEState *s, int error, int op)
int is_read = (op & BM_STATUS_RETRY_READ);
BlockInterfaceErrorAction action = drive_get_on_error(s->bs, is_read);
- if (action == BLOCK_ERR_IGNORE)
+ if (action == BLOCK_ERR_IGNORE) {
+ bdrv_mon_event(s->bs, BDRV_ACTION_IGNORE, is_read);
return 0;
+ }
if ((error == ENOSPC && action == BLOCK_ERR_STOP_ENOSPC)
|| action == BLOCK_ERR_STOP_ANY) {
s->bus->bmdma->unit = s->unit;
s->bus->bmdma->status |= op;
vm_stop(0);
+ bdrv_mon_event(s->bs, BDRV_ACTION_STOP, is_read);
} else {
if (op & BM_STATUS_DMA_RETRY) {
dma_buf_commit(s, 0);
@@ -495,6 +498,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);
}
return 1;
--
1.6.6
next prev parent reply other threads:[~2010-02-03 14:41 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-03 14:40 [Qemu-devel] [PATCH v1 0/5]: BLOCK_IO_ERROR QMP event Luiz Capitulino
2010-02-03 14:41 ` [Qemu-devel] [PATCH 1/5] QMP: BLOCK_IO_ERROR event handling Luiz Capitulino
2010-02-10 18:32 ` Anthony Liguori
2010-02-03 14:41 ` [Qemu-devel] [PATCH 2/5] block: BLOCK_IO_ERROR QMP event Luiz Capitulino
2010-02-03 14:41 ` Luiz Capitulino [this message]
2010-02-03 14:41 ` [Qemu-devel] [PATCH 4/5] scsi: Generate " Luiz Capitulino
2010-02-03 14:41 ` [Qemu-devel] [PATCH 5/5] virtio-blk: " Luiz Capitulino
-- strict thread matches above, loose matches on Subject: below --
2010-02-02 21:10 [Qemu-devel] [PATCH v0 0/5]: " Luiz Capitulino
2010-02-02 21:10 ` [Qemu-devel] [PATCH 3/5] ide: Generate " Luiz Capitulino
2010-02-03 8:31 ` Christoph Hellwig
2010-02-03 9:10 ` Kevin Wolf
2010-02-03 11:41 ` 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=1265208064-16039-4-git-send-email-lcapitulino@redhat.com \
--to=lcapitulino@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).