From: Anthony Liguori <aliguori@us.ibm.com>
To: Avi Kivity <avi@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: [Qemu-devel] Re: [PATCH 0/3] Remove ->bdrv_pread() internal block layer API (v2)
Date: Thu, 12 Mar 2009 14:57:29 -0500 [thread overview]
Message-ID: <49B96929.9000805@us.ibm.com> (raw)
In-Reply-To: <1236862631-22918-1-git-send-email-avi@redhat.com>
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(-)
>
>
>
prev parent reply other threads:[~2009-03-12 19:57 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-12 12:57 [Qemu-devel] [PATCH 0/3] Remove ->bdrv_pread() internal block layer API (v2) Avi Kivity
2009-03-12 12:57 ` [Qemu-devel] [PATCH 1/3] Add specialized block driver scsi generic API Avi Kivity
2009-03-14 14:33 ` Christoph Hellwig
2009-03-15 13:54 ` Avi Kivity
2009-03-15 14:43 ` Christoph Hellwig
2009-03-15 14:57 ` Avi Kivity
2009-03-15 15:06 ` Christoph Hellwig
2009-03-16 17:29 ` Jamie Lokier
2009-03-12 12:57 ` [Qemu-devel] [PATCH 2/3] Add internal scsi generic block API Avi Kivity
2009-03-12 12:57 ` [Qemu-devel] [PATCH 3/3] Drop internal bdrv_pread()/bdrv_pwrite() APIs Avi Kivity
2009-03-12 19:57 ` Anthony Liguori [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=49B96929.9000805@us.ibm.com \
--to=aliguori@us.ibm.com \
--cc=avi@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.