[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v4 13/16] qemu-io: Use BlockBackend
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH v4 13/16] qemu-io: Use BlockBackend |
Date: |
Thu, 05 Feb 2015 14:56:31 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 |
On 02/05/2015 11:58 AM, Max Reitz wrote:
> qemu-io should behave like a guest, therefore it should use BlockBackend
> to access the block layer.
>
> There are a couple of places where that is infeasible: First, the
> bdrv_debug_* functions could theoretically be mirrored in the
> BlockBackend, but since these are functions internal to the block layer,
> they should not be visible externally (qemu-io as a test tool is exempt
> from this).
>
> Second, bdrv_get_info() and bdrv_get_specific_info() work on a single
> BDS alone, therefore they should stay BDS-specific.
>
> Third, bdrv_is_allocated() mainly works on a single BDS as well. Some
> data may be passed through from the BDS's file (if sectors which are
> apparently allocated in the file are not really allocated there but just
> zero).
>
> Signed-off-by: Max Reitz <address@hidden>
> ---
> hmp.c | 9 ++-
> include/qemu-io.h | 4 +-
> qemu-io-cmds.c | 237
> ++++++++++++++++++++++++++++--------------------------
> qemu-io.c | 15 ++--
> 4 files changed, 137 insertions(+), 128 deletions(-)
>
Reviewed-by: Eric Blake <address@hidden>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- Re: [Qemu-devel] [PATCH v4 09/16] qemu-img: Use BlockBackend as far as possible, (continued)
- [Qemu-devel] [PATCH v4 14/16] block: Clamp BlockBackend requests, Max Reitz, 2015/02/05
- [Qemu-devel] [PATCH v4 10/16] qemu-nbd: Use blk_new_open() in main(), Max Reitz, 2015/02/05
- [Qemu-devel] [PATCH v4 11/16] qemu-io: Use blk_new_open() in openfile(), Max Reitz, 2015/02/05
- [Qemu-devel] [PATCH v4 13/16] qemu-io: Use BlockBackend, Max Reitz, 2015/02/05
- Re: [Qemu-devel] [PATCH v4 13/16] qemu-io: Use BlockBackend,
Eric Blake <=
- [Qemu-devel] [PATCH v4 16/16] block: Keep bdrv_check*_request()'s return value, Max Reitz, 2015/02/05
- [Qemu-devel] [PATCH v4 15/16] block: Remove "growable" from BDS, Max Reitz, 2015/02/05
- Re: [Qemu-devel] [PATCH v4 00/16] block: Remove "growable", add blk_new_open(), Stefan Hajnoczi, 2015/02/13