From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:55365) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RERb8-0007H8-FM for qemu-devel@nongnu.org; Thu, 13 Oct 2011 16:09:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RERb7-0002OE-4Y for qemu-devel@nongnu.org; Thu, 13 Oct 2011 16:09:46 -0400 Received: from mtagate2.uk.ibm.com ([194.196.100.162]:40359) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RERb6-0002Nq-S0 for qemu-devel@nongnu.org; Thu, 13 Oct 2011 16:09:45 -0400 Received: from d06nrmr1507.portsmouth.uk.ibm.com (d06nrmr1507.portsmouth.uk.ibm.com [9.149.38.233]) by mtagate2.uk.ibm.com (8.13.1/8.13.1) with ESMTP id p9DK9hRx001345 for ; Thu, 13 Oct 2011 20:09:43 GMT Received: from d06av06.portsmouth.uk.ibm.com (d06av06.portsmouth.uk.ibm.com [9.149.37.217]) by d06nrmr1507.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p9DK9ghB2388106 for ; Thu, 13 Oct 2011 21:09:42 +0100 Received: from d06av06.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av06.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p9E39gLT023575 for ; Thu, 13 Oct 2011 21:09:43 -0600 From: Stefan Hajnoczi Date: Thu, 13 Oct 2011 21:09:27 +0100 Message-Id: <1318536572-23771-1-git-send-email-stefanha@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH 0/5] block: remove unused emulation and synchronous functions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Kevin Wolf , 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() block.c | 142 ++------------------------- block/raw-posix.c | 277 ----------------------------------------------------- block/raw.c | 32 ++----- 3 files changed, 18 insertions(+), 433 deletions(-) -- 1.7.6.3