[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 4/6] block: expect get_block_status errors in bdrv_ma
From: |
Kevin Wolf |
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 |
From: Peter Lieven <address@hidden>
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: address@hidden
Signed-off-by: Peter Lieven <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
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
- [Qemu-devel] [PULL 0/6] Block patches, Kevin Wolf, 2013/12/13
- [Qemu-devel] [PULL 1/6] sheepdog: check if '-o redundancy' is passed from user, Kevin Wolf, 2013/12/13
- [Qemu-devel] [PULL 3/6] block/vvfat: Fix compiler warnings for OpenBSD, Kevin Wolf, 2013/12/13
- [Qemu-devel] [PULL 4/6] block: expect get_block_status errors in bdrv_make_zero,
Kevin Wolf <=
- [Qemu-devel] [PULL 2/6] qapi-schema.json: Change 1.8 reference to 2.0, Kevin Wolf, 2013/12/13
- [Qemu-devel] [PULL 5/6] qemu-img: make progress output more accurate during convert, Kevin Wolf, 2013/12/13
- [Qemu-devel] [PULL 6/6] blkdebug: Use QLIST_FOREACH_SAFE to resume IO, Kevin Wolf, 2013/12/13