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 <mre...@redhat.com> > --- > 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 <ebl...@redhat.com> -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature