Skip to content

block: Introduce common read/write function

Kevin Wolf qemu-devel 1 version Applied

Status from this message: Applied to the block branch.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest8 patches 2 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/8block: Use BdrvChild in BlockBackendblock.c block/block-backend.c include/block/block_int.h+192 -1140 replies
2/8block: Use blk_co_preadv() for blk_read()block/block-backend.c block/io.c include/block/block_int.h+65 -80 replies
3/8block: Use blk_co_pwritev() for blk_write()block/block-backend.c block/io.c include/block/block_int.h+34 -130 replies
4/8block: Pull up blk_read_unthrottled() implementationblock/block-backend.c block/io.c include/block/block.h+10 -180 replies
5/8block: Use blk_co_pwritev() in blk_write_zeroes()block/block-backend.c+8 -90 replies
6/8block: Use blk_prw() in blk_pread()/blk_pwrite()block/block-backend.c+21 -150 replies
7/8block: Use blk_aio_prwv() for aio_read/write/write_zeroesblock/block-backend.c+91 -130 replies
8/8block: Use blk_co_pwritev() in blk_co_write_zeroes()block/block-backend.c+5 -40 replies

Reviews trailers per patch

None of the 8 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchStefan Hajnoczi
SeriesR-b
1/8
2/8
3/8
4/8
5/8
6/8
7/8
8/8

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [Qemu-devel] [PATCH 0/8] block: Introduce common read/write function

BlockBackends support a few different interfaces for reads and writes. Until now they used to forward the requests directly to the BDS layer, which implemented wrappers around one central common read/write function that contained the actual implementation of features provided by the block layer.

This only works as long as none of the features are actually on the BlockBackend level. As it happens, we have features (writethrough cache, I/O throttling) that are currently implemented in the BDS, but must move to the BB.

As a preparation, this series introduces the mapping of the existing APIs to a single coroutine based preadv/pwritev function (as we already have on the BDS level) to the BB layer. The BDS version of the emulation can't go away just yet because there are internal users of them, but the goal is to remove them in the long term.

Depends on Max's "blockdev: Further BlockBackend work".

Kevin Wolf (8):
block: Use BdrvChild in BlockBackend
block: Use blk_co_preadv() for blk_read()
block: Use blk_co_pwritev() for blk_write()
block: Pull up blk_read_unthrottled() implementation
block: Use blk_co_pwritev() in blk_write_zeroes()
block: Use blk_prw() in blk_pread()/blk_pwrite()
block: Use blk_aio_prwv() for aio_read/write/write_zeroes
block: Use blk_co_pwritev() in blk_co_write_zeroes()

 block.c                   |  47 +++--
 block/block-backend.c     | 485 +++++++++++++++++++++++++++++++++-------------
 block/io.c                |  24 +--
 include/block/block.h     |   2 -
 include/block/block_int.h |  12 ++
 5 files changed, 401 insertions(+), 169 deletions(-)
Signature · 1 line
1.8.3.1