Skip to content

qed: Convert to coroutines

Kevin Wolf qemu-devel 2 versions – Applied

Status from this message: Applied to the block branch.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest31 patches 4 repliesApplied
  2. v129 patches 47 repliesSuperseded

Changes in v2 from the cover letter

- Add coroutine_fn markers [Stefan, Paolo]
- Use bdrv_co_*() instead of bdrv_*() in coroutine_fns
- Use ACB on stack in qed_co_request [Paolo]
- Updated some comments [Paolo]
- Unplug earlier in qed_clear_need_check() [Stefan]
- Removed now unused trace events [Stefan]
- Improved commit message of patch creating qed_aio_write_cow() [Eric]

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/31qed: Use bottom half to resume waiting requestsblock/qed.c+10 -30 replies
2/31qed: Make qed_read_table() synchronousblock/qed-table.c+18 -380 replies
3/31qed: Remove callback from qed_read_table()block/qed-table.c+25 -540 replies
4/31qed: Remove callback from qed_read_l2_table()block/qed-cluster.c block/qed-table.c block/qed.h+36 -760 replies
5/31qed: Remove callback from qed_find_cluster()block/qed-cluster.c block/qed.c block/qed.h+35 -320 replies
6/31qed: Make qed_read_backing_file() synchronousblock/qed.c+18 -140 replies
7/31qed: Make qed_copy_from_backing_file() synchronousblock/qed.c+29 -490 replies
8/31qed: Remove callback from qed_copy_from_backing_file()block/qed.c+23 -340 replies
9/31qed: Make qed_write_header() synchronousblock/qed.c+29 -470 replies
10/31qed: Remove callback from qed_write_header()block/qed.c+12 -200 replies
11/31qed: Make qed_write_table() synchronousblock/qed-table.c+30 -540 replies
12/31qed: Remove GenericCBblock/Makefile.objs block/qed-gencb.c block/qed.h+1 -450 replies
13/31qed: Remove callback from qed_write_table()block/qed-table.c block/qed.c block/qed.h+22 -450 replies
14/31qed: Make qed_aio_read_data() synchronousblock/qed.c+5 -30 replies
15/31qed: Make qed_aio_write_main() synchronousblock/qed.c+19 -420 replies
16/31qed: Inline qed_commit_l2_update()block/qed.c+14 -220 replies
17/31qed: Add return value to qed_aio_write_l1_update()block/qed.c+9 -100 replies
18/31qed: Add return value to qed_aio_write_l2_update()block/qed.c+26 -170 replies
19/31qed: Add return value to qed_aio_write_main()block/qed.c+30 -250 replies
20/31qed: Add return value to qed_aio_write_cow()block/qed.c+21 -370 replies
21/31qed: Add return value to qed_aio_write_inplace/alloc()block/qed.c+20 -230 replies
22/31qed: Add return value to qed_aio_read/write_data()block/qed.c block/qed.h+31 -620 replies
23/31qed: Remove ret argument from qed_aio_next_io()block/qed.c+6 -110 replies
24/31qed: Remove recursion in qed_aio_next_io()block/qed.c+32 -310 replies
25/31qed: Implement .bdrv_co_readv/writevblock/qed.c+42 -551 reply
26/31qed: Use CoQueue for serialising allocationsblock/qed.c block/qed.h+19 -330 replies
27/31qed: Simplify request handlingblock/qed.c block/qed.h+22 -820 replies
28/31qed: Use a coroutine for need_check_timerblock/qed.c+17 -160 replies
29/31qed: Add coroutine_fn to I/O path functionsblock/qed-cluster.c block/qed.c block/qed.h+30 -240 replies
30/31qed: Use bdrv_co_* for coroutine_fnsblock/qed.c+9 -71 reply
31/31block: Remove bdrv_aio_readv/writev/flush()block/io.c block/trace-events include/block/block.h+0 -1820 replies

Reviews trailers per patch

26 of 31 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchEric BlakeStefan HajnocziManos Pitsidianakis
SeriesR-b
1/31R-b R-b
2/31R-b R-b
3/31R-b R-b
4/31R-b R-b
5/31
6/31R-b R-b
7/31R-b R-b
8/31R-b R-b
9/31R-b R-b
10/31
11/31R-b
12/31R-b
13/31R-b
14/31R-b
15/31R-b
16/31R-b
17/31R-b
18/31R-b
19/31R-b
20/31R-b
21/31R-b
22/31R-b
23/31R-b
24/31R-b
25/31R-b
26/31R-b
27/31R-b
28/31
29/31
30/31R-b
31/31

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v2 thread

Cover letter [Qemu-devel] [PATCH v2 00/31] qed: Convert to coroutines

The qed block driver is one of the last remaining block drivers that use the AIO callback style interfaces. This series converts it to the coroutine model that other drivers are using and removes some AIO functions from the block layer API afterwards.

If this isn't compelling enough, the diffstat should speak for itself.

This series is relatively long, but it consists mostly of mechanical conversions of one function per patch, so it should be easy to review.

v2:
- Add coroutine_fn markers [Stefan, Paolo]
- Use bdrv_co_*() instead of bdrv_*() in coroutine_fns
- Use ACB on stack in qed_co_request [Paolo]
- Updated some comments [Paolo]
- Unplug earlier in qed_clear_need_check() [Stefan]
- Removed now unused trace events [Stefan]
- Improved commit message of patch creating qed_aio_write_cow() [Eric]

Kevin Wolf (31):
qed: Use bottom half to resume waiting requests
qed: Make qed_read_table() synchronous
qed: Remove callback from qed_read_table()
qed: Remove callback from qed_read_l2_table()
qed: Remove callback from qed_find_cluster()
qed: Make qed_read_backing_file() synchronous
qed: Make qed_copy_from_backing_file() synchronous
qed: Remove callback from qed_copy_from_backing_file()
qed: Make qed_write_header() synchronous
qed: Remove callback from qed_write_header()
qed: Make qed_write_table() synchronous
qed: Remove GenericCB
qed: Remove callback from qed_write_table()
qed: Make qed_aio_read_data() synchronous
qed: Make qed_aio_write_main() synchronous
qed: Inline qed_commit_l2_update()
qed: Add return value to qed_aio_write_l1_update()
qed: Add return value to qed_aio_write_l2_update()
qed: Add return value to qed_aio_write_main()
qed: Add return value to qed_aio_write_cow()
qed: Add return value to qed_aio_write_inplace/alloc()
qed: Add return value to qed_aio_read/write_data()
qed: Remove ret argument from qed_aio_next_io()
qed: Remove recursion in qed_aio_next_io()
qed: Implement .bdrv_co_readv/writev
qed: Use CoQueue for serialising allocations
qed: Simplify request handling
qed: Use a coroutine for need_check_timer
qed: Add coroutine_fn to I/O path functions
qed: Use bdrv_co_* for coroutine_fns
block: Remove bdrv_aio_readv/writev/flush()

 block/Makefile.objs   |   2 +-
 block/io.c            | 171 -----------
 block/qed-cluster.c   | 124 ++++----
 block/qed-gencb.c     |  33 ---
 block/qed-table.c     | 261 ++++++-----------
 block/qed.c           | 773 +++++++++++++++++++-------------------------------
 block/qed.h           |  54 +---
 block/trace-events    |   3 -
 include/block/block.h |   8 -
 9 files changed, 438 insertions(+), 991 deletions(-)
 delete mode 100644 block/qed-gencb.c
Signature · 1 line
1.8.3.1