From: Luiz Capitulino <lcapitulino@redhat.com>
To: qemu-devel@nongnu.org
Cc: kwolf@redhat.com
Subject: [Qemu-devel] [PATCH 5/5] virtio-blk: Generate BLOCK_IO_ERROR QMP event
Date: Wed, 3 Feb 2010 12:41:04 -0200 [thread overview]
Message-ID: <1265208064-16039-6-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/virtio-blk.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/hw/virtio-blk.c b/hw/virtio-blk.c
index 037a79c..75adbec 100644
--- a/hw/virtio-blk.c
+++ b/hw/virtio-blk.c
@@ -105,16 +105,20 @@ static int virtio_blk_handle_rw_error(VirtIOBlockReq *req, int error,
drive_get_on_error(req->dev->bs, is_read);
VirtIOBlock *s = req->dev;
- if (action == BLOCK_ERR_IGNORE)
+ if (action == BLOCK_ERR_IGNORE) {
+ bdrv_mon_event(req->dev->bs, BDRV_ACTION_IGNORE, is_read);
return 0;
+ }
if ((error == ENOSPC && action == BLOCK_ERR_STOP_ENOSPC)
|| action == BLOCK_ERR_STOP_ANY) {
req->next = s->rq;
s->rq = req;
vm_stop(0);
+ bdrv_mon_event(req->dev->bs, BDRV_ACTION_STOP, is_read);
} else {
virtio_blk_req_complete(req, VIRTIO_BLK_S_IOERR);
+ bdrv_mon_event(req->dev->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: 8+ 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 ` [Qemu-devel] [PATCH 3/5] ide: Generate " Luiz Capitulino
2010-02-03 14:41 ` [Qemu-devel] [PATCH 4/5] scsi: " Luiz Capitulino
2010-02-03 14:41 ` Luiz Capitulino [this message]
-- 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 5/5] virtio-blk: Generate " 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-6-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).