qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/3] Remove ->bdrv_pread() internal block layer API
@ 2009-02-08 17:59 Avi Kivity
  2009-02-08 17:59 ` [Qemu-devel] [PATCH 1/3] Add specialized block driver scsi generic API Avi Kivity
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Avi Kivity @ 2009-02-08 17:59 UTC (permalink / raw)
  To: Anthony Liguori, qemu-devel

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.

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           |   95 +++++++++++++++-------------------------------------
 block.h           |    8 ++++
 block_int.h       |   14 +++++--
 hw/scsi-generic.c |   39 ++++++++++++---------
 6 files changed, 126 insertions(+), 100 deletions(-)

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2009-02-08 19:38 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-08 17:59 [Qemu-devel] [PATCH 0/3] Remove ->bdrv_pread() internal block layer API Avi Kivity
2009-02-08 17:59 ` [Qemu-devel] [PATCH 1/3] Add specialized block driver scsi generic API Avi Kivity
2009-02-08 17:59 ` [Qemu-devel] [PATCH 2/3] Add internal scsi generic block API Avi Kivity
2009-02-08 17:59 ` [Qemu-devel] [PATCH 3/3] Drop internal bdrv_pread()/bdrv_pwrite() APIs Avi Kivity
2009-02-08 19:10   ` [Qemu-devel] " Anthony Liguori
2009-02-08 19:36     ` Avi Kivity
2009-02-08 19:37     ` Avi Kivity
2009-02-08 19:05 ` [Qemu-devel] Re: [PATCH 0/3] Remove ->bdrv_pread() internal block layer API Anthony Liguori

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).