qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 0/5] block: remove unused emulation and synchron


From: Kevin Wolf
Subject: Re: [Qemu-devel] [PATCH 0/5] block: remove unused emulation and synchronous functions
Date: Fri, 14 Oct 2011 11:55:40 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:7.0) Gecko/20110927 Thunderbird/7.0

Am 13.10.2011 22:09, schrieb Stefan Hajnoczi:
> Now that the block layer processes requests in coroutine context, some of the
> emulation wrappers and duplicate code paths can be dropped.  Paraphrasing a
> wise man, Arnold Schwarzenegger, "I will go to the block layer and I will 
> clean
> house" :).
> 
> They key thing behind this series is that the block layer processes requests 
> in
> coroutine context and will try to use .brdv_co_readv()/.bdrv_co_writev() when
> possible.  Should the BlockDriver not implement those interfaces, an emulation
> function will be used to provide them using aio.  If the BlockDriver does not
> implement aio interfaces, then an emulation function will be used to provide
> them using synchronous I/O.
> 
> This means:
> 
> 1. A BlockDriver that implements coroutine interfaces does not need to
>    implement aio or synchronous interfaces.
> 
> 2. A BlockDriver that implements aio interfaces does not need to implement
>    synchronous interfaces.
> 
> 3. Coroutine interfaces are preferred and do not require any emulation
>    functions.
> 
> This patch series propagates these rules across existing BlockDrivers and
> removes unused emulation functions from block.c.
> 
> Stefan Hajnoczi (5):
>   block: drop emulation functions that use coroutines
>   raw-posix: remove bdrv_read()/bdrv_write()
>   block: use coroutine interface for raw format
>   block: drop .bdrv_read()/.bdrv_write() emulation
>   block: drop bdrv_has_async_rw()

Thanks, applied all to the block branch.

>  block.c           |  142 ++-------------------------
>  block/raw-posix.c |  277 
> -----------------------------------------------------
>  block/raw.c       |   32 ++-----
>  3 files changed, 18 insertions(+), 433 deletions(-)

Awesome. We need more series like this! :-)

Kevin



reply via email to

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