qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-block] [PATCH v2 5/9] block: Remove bdrv_aio_multiwrite()


From: Eric Blake
Subject: Re: [Qemu-block] [PATCH v2 5/9] block: Remove bdrv_aio_multiwrite()
Date: Fri, 6 May 2016 06:29:57 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0

On 04/27/2016 07:20 AM, Kevin Wolf wrote:
> Since virtio-blk implements request merging itself these days, the only
> remaining users are test cases for the function. That doesn't make the
> function exactly useful any more.
> 
> Signed-off-by: Kevin Wolf <address@hidden>
> Reviewed-by: Max Reitz <address@hidden>
> ---
>  block/block-backend.c          |  14 ---
>  block/io.c                     | 194 ---------------------------------------
>  include/block/block.h          |   7 +-
>  include/sysemu/block-backend.h |   1 -
>  qemu-io-cmds.c                 | 203 
> -----------------------------------------
>  tests/qemu-iotests/100         | 145 -----------------------------
>  tests/qemu-iotests/100.out     |  89 ------------------
>  tests/qemu-iotests/136         |  20 +---
>  tests/qemu-iotests/136.out     |   4 +-
>  tests/qemu-iotests/group       |   2 +-
>  trace-events                   |   2 -

Reviewed-by: Eric Blake <address@hidden>

Now that BlockRequest is no longer used in any .h files, should we move
the struct out of block.h and into io.c as a followup?  I already
attempted touching the struct in my series on killing blk_read(), before
realizing you were killing the last public use of the struct, so maybe
I'll go ahead and tackle that simplification.

> +++ b/include/block/block.h
> @@ -329,7 +329,7 @@ void bdrv_aio_cancel(BlockAIOCB *acb);
>  void bdrv_aio_cancel_async(BlockAIOCB *acb);
>  
>  typedef struct BlockRequest {
> -    /* Fields to be filled by multiwrite caller */
> +    /* Fields to be filled by caller */

Technically, the caller...

>      union {
>          struct {
>              int64_t sector;
> @@ -345,13 +345,10 @@ typedef struct BlockRequest {
>      BlockCompletionFunc *cb;
>      void *opaque;
>  
> -    /* Filled by multiwrite implementation */
> +    /* Filled by block layer */

...is now always the block layer.

>      int error;
>  } BlockRequest;

Hence my suggestion to move this to io.c and perhaps inline it into the
other structs already there.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]