From: Kevin Wolf <kwolf@redhat.com>
To: anthony@codemonkey.ws
Cc: kwolf@redhat.com, qemu-devel@nongnu.org
Subject: [Qemu-devel] [PULL 4/6] block: expect get_block_status errors in bdrv_make_zero
Date: Fri, 13 Dec 2013 18:49:01 +0100 [thread overview]
Message-ID: <1386956943-19474-5-git-send-email-kwolf@redhat.com> (raw)
In-Reply-To: <1386956943-19474-1-git-send-email-kwolf@redhat.com>
From: Peter Lieven <pl@kamp.de>
during testing around with 4k LUNs a bad target implementation
triggert an -EIO in iscsi_get_block_status, but it got never caught
resulting in an infinite loop.
CC: qemu-stable@nongnu.org
Signed-off-by: Peter Lieven <pl@kamp.de>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
block.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/block.c b/block.c
index 13f001a..64e7d22 100644
--- a/block.c
+++ b/block.c
@@ -2421,6 +2421,11 @@ int bdrv_make_zero(BlockDriverState *bs, BdrvRequestFlags flags)
nb_sectors = INT_MAX;
}
ret = bdrv_get_block_status(bs, sector_num, nb_sectors, &n);
+ if (ret < 0) {
+ error_report("error getting block status at sector %" PRId64 ": %s",
+ sector_num, strerror(-ret));
+ return ret;
+ }
if (ret & BDRV_BLOCK_ZERO) {
sector_num += n;
continue;
--
1.8.1.4
next prev parent reply other threads:[~2013-12-13 17:49 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-13 17:48 [Qemu-devel] [PULL 0/6] Block patches Kevin Wolf
2013-12-13 17:48 ` [Qemu-devel] [PULL 1/6] sheepdog: check if '-o redundancy' is passed from user Kevin Wolf
2013-12-13 17:48 ` [Qemu-devel] [PULL 2/6] qapi-schema.json: Change 1.8 reference to 2.0 Kevin Wolf
2013-12-13 17:49 ` [Qemu-devel] [PULL 3/6] block/vvfat: Fix compiler warnings for OpenBSD Kevin Wolf
2013-12-13 17:49 ` Kevin Wolf [this message]
2013-12-13 17:49 ` [Qemu-devel] [PULL 5/6] qemu-img: make progress output more accurate during convert Kevin Wolf
2013-12-13 17:49 ` [Qemu-devel] [PULL 6/6] blkdebug: Use QLIST_FOREACH_SAFE to resume IO Kevin Wolf
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=1386956943-19474-5-git-send-email-kwolf@redhat.com \
--to=kwolf@redhat.com \
--cc=anthony@codemonkey.ws \
--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).