Hi all! Here is small new read flag: BDRV_REQ_PREFETCH, which in combination with BDRV_REQ_COPY_ON_READ does copy-on-read without extra buffer for read data. This means that only parts that needs COR will be actually read and only corresponding buffers allocated, no more.
This allows to improve a bit block-stream and NBD_CMD_CACHE v2: change interface to be just one flag BDRV_REQ_PREFETCH v1 was "[PATCH 0/3] block: blk_co_pcache" https://lists.gnu.org/archive/html/qemu-devel/2019-06/msg01047.html Vladimir Sementsov-Ogievskiy (3): block: implement BDRV_REQ_PREFETCH block/stream: use BDRV_REQ_PREFETCH nbd: improve CMD_CACHE: use blk_co_pcache include/block/block.h | 8 +++++++- block/io.c | 18 ++++++++++++------ block/stream.c | 20 +++++++------------- nbd/server.c | 43 +++++++++++++++++++++++++++++++++++-------- 4 files changed, 61 insertions(+), 28 deletions(-) -- 2.18.0