Skip to content

RFC block: Rewrite block drain begin/end

Fam Zheng qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest9 patches 11 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9block: Remove unused bdrv_requests_pendingblock/io.c include/block/block_int.h+0 -191 reply
2/9aio: Add drain begin/end API to AioContextinclude/block/aio.h util/async.c+97 -31 reply
3/9blockjob: Implement AioContext drain opsblockjob.c+30 -171 reply
4/9throttle: Implement AioContext drain opsblock/throttle.c+27 -70 replies
5/9qed: Implement AioContext drain opsblock/qed.c+25 -90 replies
6/9block: Use aio_context_drained_begin in bdrv_set_aio_contextblock.c+2 -40 replies
7/9block: Switch to use AIO drained begin/end APIblock/io.c+10 -1060 replies
8/9block: Drop old drained_{begin, end} callbacksblock.c block/block-backend.c blockjob.c +3 more+0 -870 replies
9/9blockjob: Drop unused functionsblockjob.c include/block/blockjob_int.h+0 -380 replies

Reviews trailers per patch

1 of 9 patches has a Reviewed-by or Acked-by.

PatchAlberto Garcia
1/9R-b
2/9
3/9
4/9
5/9
6/9
7/9
8/9
9/9

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 RFC 0/9] block: Rewrite block drain begin/end

While we look at the fixes for 2.11, I briefly prototyped this series to see if it makes sense as a simplification of the drain API for 2.12.

The idea is to let AioContext manage quiesce callbacks, then the block layer only needs to do the in-flight request waiting. This lets us get rid of the callback recursion (both up and down).

Many commit logs and code comments are definitely missing, but it would be good to get high level review and maybe some testing already.

Fam

Fam Zheng (9):
block: Remove unused bdrv_requests_pending
aio: Add drain begin/end API to AioContext
blockjob: Implement AioContext drain ops
throttle: Implement AioContext drain ops
qed: Implement AioContext drain ops
block: Use aio_context_drained_begin in bdrv_set_aio_context
block: Switch to use AIO drained begin/end API
block: Drop old drained_{begin,end} callbacks
blockjob: Drop unused functions

 block.c                        |  30 +--------
 block/block-backend.c          |  22 -------
 block/io.c                     | 134 +++--------------------------------------
 block/qed.c                    |  34 ++++++++---
 block/throttle.c               |  34 ++++++++---
 blockjob.c                     |  67 ++++++++-------------
 include/block/aio.h            |  27 ++++++++-
 include/block/block.h          |  16 -----
 include/block/block_int.h      |  12 ----
 include/block/blockjob_int.h   |  14 -----
 include/sysemu/block-backend.h |   8 ---
 util/async.c                   |  73 ++++++++++++++++++++++
 12 files changed, 186 insertions(+), 285 deletions(-)
Signature · 1 line
2.14.3