Remove ->bdrv_pread() internal block layer API (v2)
Status from this message: Applied all. Thanks.
Get series with b4
b4 am [email protected]Versions newest first
Changes since v1 from the cover letter
- 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.
Patches in v1 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | Add specialized block driver scsi generic APIblock.c block.h hw/ | +52 | 6 replies | |
| 2/3 | Add internal scsi generic block APIblock-raw-posix.c block.c block_int.h | +44 | 0 replies | |
| 3/3 | Drop internal bdrv_pread()/bdrv_pwrite() APIsblock-raw-posix.c block-raw-win32.c block.c +1 more | +34 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [Qemu-devel] [PATCH 0/3] Remove ->bdrv_pread() internal block layer API (v2)
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.
---
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(-)