Re: [Qemu-devel] [PATCH 06/17] block: expect errors from bdrv_co_is_allocated

2013-07-05 Thread Stefan Hajnoczi
On Wed, Jul 03, 2013 at 04:34:20PM +0200, Paolo Bonzini wrote: diff --git a/qemu-img.c b/qemu-img.c index f8c97d3..857e2ca 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -2073,6 +2073,10 @@ static int img_rebase(int argc, char **argv) /* If the cluster is allocated, we don't

Re: [Qemu-devel] [PATCH 06/17] block: expect errors from bdrv_co_is_allocated

2013-07-05 Thread Paolo Bonzini
Il 05/07/2013 11:19, Stefan Hajnoczi ha scritto: /* If the cluster is allocated, we don't need to take action */ ret = bdrv_is_allocated(bs, sector, n, n); +if (ret 0) { +error_report(error while reading from file); +

[Qemu-devel] [PATCH 06/17] block: expect errors from bdrv_co_is_allocated

2013-07-03 Thread Paolo Bonzini
Some bdrv_is_allocated callers do not expect errors, but the fallback in qcow2.c might make other callers trip on assertion failures or infinite loops. Fix the callers to always look for errors. Cc: qemu-sta...@nongnu.org Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- block/qcow2.c | 4