[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [Qemu-devel] [PATCH 04/17] block: Rename bdrv_co_do_pre
From: |
Eric Blake |
Subject: |
Re: [Qemu-block] [Qemu-devel] [PATCH 04/17] block: Rename bdrv_co_do_preadv/writev to bdrv_co_preadv/writev |
Date: |
Wed, 27 Apr 2016 08:34:39 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 |
On 04/27/2016 03:52 AM, Kevin Wolf wrote:
> It used to be an internal helper function just for implementing
> bdrv_co_do_readv/writev(), but now that it's a public interface, it
> deserves a name without "do" in it.
>
> Signed-off-by: Kevin Wolf <address@hidden>
> ---
> block/block-backend.c | 4 ++--
> block/io.c | 20 ++++++++++----------
> block/raw_bsd.c | 4 ++--
> hw/ide/macio.c | 4 ++--
> include/block/block_int.h | 4 ++--
> 5 files changed, 18 insertions(+), 18 deletions(-)
>
> @@ -1127,7 +1127,7 @@ static int coroutine_fn
> bdrv_co_do_readv(BlockDriverState *bs,
> return -EINVAL;
> }
>
> - return bdrv_co_do_preadv(bs, sector_num << BDRV_SECTOR_BITS,
> + return bdrv_co_preadv(bs, sector_num << BDRV_SECTOR_BITS,
> nb_sectors << BDRV_SECTOR_BITS, qiov, flags);
> }
Missed alignment.
> @@ -1523,7 +1523,7 @@ static int coroutine_fn
> bdrv_co_do_writev(BlockDriverState *bs,
> return -EINVAL;
> }
>
> - return bdrv_co_do_pwritev(bs, sector_num << BDRV_SECTOR_BITS,
> + return bdrv_co_pwritev(bs, sector_num << BDRV_SECTOR_BITS,
> nb_sectors << BDRV_SECTOR_BITS, qiov, flags);
> }
and again
> +++ b/hw/ide/macio.c
> @@ -55,8 +55,8 @@ static const int debug_macio = 0;
> /*
> * Unaligned DMA read/write access functions required for OS X/Darwin which
> * don't perform DMA transactions on sector boundaries. These functions are
> - * modelled on bdrv_co_do_preadv()/bdrv_co_do_pwritev() and so should be
> - * easy to remove if the unaligned block APIs are ever exposed.
> + * modelled on bdrv_co_preadv()/bdrv_co_pwritev() and so should be easy to
> + * remove if the unaligned block APIs are ever exposed.
> */
Is this comment now stale as a result of your series?
> +++ b/include/block/block_int.h
> @@ -517,10 +517,10 @@ extern BlockDriver bdrv_qcow2;
> */
> void bdrv_setup_io_funcs(BlockDriver *bdrv);
>
> -int coroutine_fn bdrv_co_do_preadv(BlockDriverState *bs,
> +int coroutine_fn bdrv_co_preadv(BlockDriverState *bs,
> int64_t offset, unsigned int bytes, QEMUIOVector *qiov,
> BdrvRequestFlags flags);
> -int coroutine_fn bdrv_co_do_pwritev(BlockDriverState *bs,
> +int coroutine_fn bdrv_co_pwritev(BlockDriverState *bs,
> int64_t offset, unsigned int bytes, QEMUIOVector *qiov,
> BdrvRequestFlags flags);
Should alignment be attempted here, while touching it?
My comments are minor, so whether or not you make those changes:
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
- [Qemu-block] [PATCH 00/17] block: Convert .bdrv_read/write to .bdrv_preadv/pwritev, Kevin Wolf, 2016/04/27
- [Qemu-block] [PATCH 01/17] block: Introduce bdrv_driver_preadv(), Kevin Wolf, 2016/04/27
- [Qemu-block] [PATCH 02/17] block: Introduce bdrv_driver_pwritev(), Kevin Wolf, 2016/04/27
- [Qemu-block] [PATCH 03/17] block: Support AIO drivers in bdrv_driver_preadv/pwritev(), Kevin Wolf, 2016/04/27
- [Qemu-block] [PATCH 04/17] block: Rename bdrv_co_do_preadv/writev to bdrv_co_preadv/writev, Kevin Wolf, 2016/04/27
- Re: [Qemu-block] [Qemu-devel] [PATCH 04/17] block: Rename bdrv_co_do_preadv/writev to bdrv_co_preadv/writev,
Eric Blake <=
- [Qemu-block] [PATCH 08/17] dmg: Implement .bdrv_co_preadv() interface, Kevin Wolf, 2016/04/27
- [Qemu-block] [PATCH 07/17] cloop: Implement .bdrv_co_preadv() interface, Kevin Wolf, 2016/04/27
- [Qemu-block] [PATCH 09/17] vdi: Implement .bdrv_co_preadv() interface, Kevin Wolf, 2016/04/27
- [Qemu-block] [PATCH 05/17] block: Introduce .bdrv_co_preadv/pwritev BlockDriver function, Kevin Wolf, 2016/04/27
- [Qemu-block] [PATCH 06/17] bochs: Implement .bdrv_co_preadv() interface, Kevin Wolf, 2016/04/27