[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v4 08/21] block: expect errors from bdrv_co_is_a
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH v4 08/21] block: expect errors from bdrv_co_is_allocated |
Date: |
Thu, 29 Aug 2013 15:35:30 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130805 Thunderbird/17.0.8 |
On 08/29/2013 08:00 AM, Paolo Bonzini wrote:
Subject line mentions bdrv_co_is_allocated, but patch body deals with
bdrv_is_allocated.
> 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: address@hidden
> Reviewed-by: Eric Blake <address@hidden>
> Signed-off-by: Paolo Bonzini <address@hidden>
> ---
> v4: also fix bdrv_commit, cow_read, img_convert, alloc_f
Hmm - the v4 changelog implies things changed since my review.
Thankfully, this patch still looks sane when looking at just this patch
(what you have is good). But your comment made me grep the rest of the
source code for ALL bdrv_is_allocated callers (since that's the harder
task - ensuring we didn't forget anything):
block-migration.c uses !bdrv_is_allocated as a condition for a while
loop; should that check for errors?
block/vvfat.c contains an if (bdrv_is_allocated(...)); should that
handle errors?
If you can justify that those don't need changes, then I'm okay with:
Reviewed-by: Eric Blake <address@hidden>
> block.c | 7 +++++--
> block/cow.c | 6 +++++-
> block/qcow2.c | 4 +---
> block/stream.c | 2 +-
> qemu-img.c | 16 ++++++++++++++--
> qemu-io-cmds.c | 4 ++++
> 6 files changed, 30 insertions(+), 9 deletions(-)
>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [PATCH v4 00/21] Add qemu-img subcommand to dump file metadata, Paolo Bonzini, 2013/08/29
- [Qemu-devel] [PATCH v4 01/21] cow: make reads go at a decent speed, Paolo Bonzini, 2013/08/29
- [Qemu-devel] [PATCH v4 02/21] cow: make writes go at a less indecent speed, Paolo Bonzini, 2013/08/29
- [Qemu-devel] [PATCH v4 03/21] cow: do not call bdrv_co_is_allocated, Paolo Bonzini, 2013/08/29
- [Qemu-devel] [PATCH v4 04/21] block: keep bs->total_sectors up to date even for growable block devices, Paolo Bonzini, 2013/08/29
- [Qemu-devel] [PATCH v4 05/21] block: make bdrv_co_is_allocated static, Paolo Bonzini, 2013/08/29
- [Qemu-devel] [PATCH v4 08/21] block: expect errors from bdrv_co_is_allocated, Paolo Bonzini, 2013/08/29
- Re: [Qemu-devel] [PATCH v4 08/21] block: expect errors from bdrv_co_is_allocated,
Eric Blake <=
- [Qemu-devel] [PATCH v4 06/21] block: do not use ->total_sectors in bdrv_co_is_allocated, Paolo Bonzini, 2013/08/29
- [Qemu-devel] [PATCH v4 07/21] block: remove bdrv_is_allocated_above/bdrv_co_is_allocated_above distinction, Paolo Bonzini, 2013/08/29
- [Qemu-devel] [PATCH v4 09/21] qemu-img: always probe the input image for allocated sectors, Paolo Bonzini, 2013/08/29
- [Qemu-devel] [PATCH v4 10/21] block: make bdrv_has_zero_init return false for copy-on-write-images, Paolo Bonzini, 2013/08/29
- [Qemu-devel] [PATCH v4 13/21] block: return get_block_status data and flags for formats, Paolo Bonzini, 2013/08/29
- [Qemu-devel] [PATCH v4 11/21] block: introduce bdrv_get_block_status API, Paolo Bonzini, 2013/08/29
- [Qemu-devel] [PATCH v4 12/21] block: define get_block_status return value, Paolo Bonzini, 2013/08/29
- [Qemu-devel] [PATCH v4 14/21] block: use bdrv_has_zero_init to return BDRV_BLOCK_ZERO, Paolo Bonzini, 2013/08/29