* [Qemu-devel] [PATCH] block: expect get_block_status errors in bdrv_make_zero
@ 2013-12-12 12:57 Peter Lieven
2013-12-12 13:31 ` Stefan Hajnoczi
0 siblings, 1 reply; 3+ messages in thread
From: Peter Lieven @ 2013-12-12 12:57 UTC (permalink / raw)
To: qemu-devel; +Cc: kwolf, pbonzini, Peter Lieven, qemu-stable, stefanha
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 invinite loop.
CC: qemu-stable@nongnu.org
Signed-off-by: Peter Lieven <pl@kamp.de>
---
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.7.9.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] block: expect get_block_status errors in bdrv_make_zero
2013-12-12 12:57 [Qemu-devel] [PATCH] block: expect get_block_status errors in bdrv_make_zero Peter Lieven
@ 2013-12-12 13:31 ` Stefan Hajnoczi
2013-12-12 14:26 ` Kevin Wolf
0 siblings, 1 reply; 3+ messages in thread
From: Stefan Hajnoczi @ 2013-12-12 13:31 UTC (permalink / raw)
To: Peter Lieven; +Cc: kwolf, pbonzini, qemu-devel, qemu-stable
On Thu, Dec 12, 2013 at 01:57:05PM +0100, Peter Lieven wrote:
> 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 invinite loop.
>
> CC: qemu-stable@nongnu.org
> Signed-off-by: Peter Lieven <pl@kamp.de>
> ---
> block.c | 5 +++++
> 1 file changed, 5 insertions(+)
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] block: expect get_block_status errors in bdrv_make_zero
2013-12-12 13:31 ` Stefan Hajnoczi
@ 2013-12-12 14:26 ` Kevin Wolf
0 siblings, 0 replies; 3+ messages in thread
From: Kevin Wolf @ 2013-12-12 14:26 UTC (permalink / raw)
To: Stefan Hajnoczi; +Cc: pbonzini, Peter Lieven, qemu-devel, qemu-stable
Am 12.12.2013 um 14:31 hat Stefan Hajnoczi geschrieben:
> On Thu, Dec 12, 2013 at 01:57:05PM +0100, Peter Lieven wrote:
> > 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 invinite loop.
s/invinite/infinite/
> >
> > CC: qemu-stable@nongnu.org
> > Signed-off-by: Peter Lieven <pl@kamp.de>
> > ---
> > block.c | 5 +++++
> > 1 file changed, 5 insertions(+)
>
> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Thanks, fixed up the typo in the commit message and applied to the
block branch.
Kevin
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-12-12 14:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-12 12:57 [Qemu-devel] [PATCH] block: expect get_block_status errors in bdrv_make_zero Peter Lieven
2013-12-12 13:31 ` Stefan Hajnoczi
2013-12-12 14:26 ` Kevin Wolf
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).