From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Lhr28-0002uu-1x for qemu-devel@nongnu.org; Thu, 12 Mar 2009 15:57:36 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Lhr27-0002uV-7t for qemu-devel@nongnu.org; Thu, 12 Mar 2009 15:57:35 -0400 Received: from [199.232.76.173] (port=59029 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Lhr26-0002uR-Uh for qemu-devel@nongnu.org; Thu, 12 Mar 2009 15:57:35 -0400 Received: from e4.ny.us.ibm.com ([32.97.182.144]:38367) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Lhr26-00039i-Hp for qemu-devel@nongnu.org; Thu, 12 Mar 2009 15:57:34 -0400 Received: from d01relay02.pok.ibm.com (d01relay02.pok.ibm.com [9.56.227.234]) by e4.ny.us.ibm.com (8.13.1/8.13.1) with ESMTP id n2CJsnJU029002 for ; Thu, 12 Mar 2009 15:54:49 -0400 Received: from d01av04.pok.ibm.com (d01av04.pok.ibm.com [9.56.224.64]) by d01relay02.pok.ibm.com (8.13.8/8.13.8/NCO v9.2) with ESMTP id n2CJvVfT195654 for ; Thu, 12 Mar 2009 15:57:31 -0400 Received: from d01av04.pok.ibm.com (loopback [127.0.0.1]) by d01av04.pok.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id n2CJvV0u011667 for ; Thu, 12 Mar 2009 15:57:31 -0400 Message-ID: <49B96929.9000805@us.ibm.com> Date: Thu, 12 Mar 2009 14:57:29 -0500 From: Anthony Liguori MIME-Version: 1.0 References: <1236862631-22918-1-git-send-email-avi@redhat.com> In-Reply-To: <1236862631-22918-1-git-send-email-avi@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH 0/3] Remove ->bdrv_pread() internal block layer API (v2) Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Avi Kivity Cc: qemu-devel@nongnu.org Avi Kivity wrote: > The internal block layer API has a wart in the form of the > ->bdrv_pread() and ->bdrv_pwrite() methods. These duplicate > bdrv_read() and bdrv_write(), and are unnatural for a block > device in that they are not sector oriented. > > One of the reasons for their existence is the scsi-generic host support. > That is also a wart, as scsi-generic is really a packet (command/response) > rather than a block (random access to sectors) API. There is also the > wierd negative sector count == byte count thing. > > This patchset addresses these warts by adding a new API for scsi-generic > and dropping ->bdrv_pread() and bdrv_pwrite(). While the improvement > falls short of spectacular, it does make further hacking on the block > layer easier as there are fewer callbacks to worry about. > Applied all. Thanks. Regards, Anthony Liguori > --- > > Changes since v1: > - rebased against trunk > - performance testing: tested 'rm -rf *; tar xjf ../linux-2.6.22.tar.bz2' > with a vm snapshot. While there are significant variances among runs > (15-25sec), likely due to different ext3 allocation decisions and different > host caching decisions, there seems to be no regression due to this patchset. > > Avi Kivity (3): > Add specialized block driver scsi generic API > Add internal scsi generic block API > Drop internal bdrv_pread()/bdrv_pwrite() APIs > > block-raw-posix.c | 50 ++++++++++++++++++++++++-- > block-raw-win32.c | 20 ++++++---- > block.c | 101 +++++++++++++++-------------------------------------- > block.h | 8 ++++ > block_int.h | 14 +++++-- > hw/scsi-generic.c | 39 +++++++++++--------- > 6 files changed, 126 insertions(+), 106 deletions(-) > > >