Skip to content

block/io: safer inc/dec in_flight sections

Vladimir Sementsov-Ogievskiy qemu-devel 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest9 patches 17 repliesIn review
  2. v19 patches 14 repliesSuperseded

Changes in v2 from the cover letter

01: drop coroutine_fn from bdrv_is_allocated_above declaration
02-04: add Stefan's r-b
05: improve commit message
fix typo in bdrv_do_pdiscard name
add more "To be called between exactly one pair of bdrv_inc/dec_in_flight()" comments drop unused bs variable
fix bdrv_pdiscard_co_entry to use bdrv_do_pdiscard
06: similarly to 05, add additional comment to bdrv_is_allocated_above_co_entry
07-08: add Stefan's r-b
09: add "To be called between exactly one pair of bdrv_inc/dec_in_flight()" for bdrv_make_zero_co_entry

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9block/io: refactor bdrv_is_allocated_above to run only one coroutineblock/io.c+71 -51 reply
2/9block/io: refactor bdrv_co_ioctl: move aio stuff to corresponding blockblock/io.c+15 -80 replies
3/9block/io: move flush and pdiscard stuff downblock/io.c+28 -280 replies
4/9block/io: move bdrv_rw_co_entry and friends downblock/io.c+181 -1800 replies
5/9block/io: expand in_flight inc/dec section: simple casesblock/io.c+124 -3711 replies
6/9block/io: expand in_flight inc/dec section: block-statusblock/io.c+51 -142 replies
7/9block/io: add bdrv_do_pwrite_zeroesblock/io.c+19 -41 reply
8/9block/io: move bdrv_make_zero under block-statusblock/io.c+41 -410 replies
9/9block/io: expand in_flight inc/dec section: bdrv_make_zeroblock/io.c+51 -31 reply

Reviews trailers per patch

All 9 patches have a Reviewed-by or Acked-by.

PatchStefan HajnocziEric Blake
1/9R-b
2/9R-b
3/9R-b
4/9R-b
5/9R-b
6/9R-b
7/9R-b R-b
8/9R-b
9/9R-b

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

Read the v2 thread

Cover letter [PATCH v2 0/9] block/io: safer inc/dec in_flight sections

Hi all!

This is inspired by Kevin's
"block: Fix blk->in_flight during blk_wait_while_drained()" series.

So, like it's now done for block-backends, let's expand in_flight-protected sections for bdrv_ interfaces, including coroutine_enter and BDRV_POLL_WHILE loop into these sections.

v2:
01: drop coroutine_fn from bdrv_is_allocated_above declaration
02-04: add Stefan's r-b
05: improve commit message
fix typo in bdrv_do_pdiscard name
add more "To be called between exactly one pair of bdrv_inc/dec_in_flight()" comments drop unused bs variable
fix bdrv_pdiscard_co_entry to use bdrv_do_pdiscard
06: similarly to 05, add additional comment to bdrv_is_allocated_above_co_entry
07-08: add Stefan's r-b
09: add "To be called between exactly one pair of bdrv_inc/dec_in_flight()" for bdrv_make_zero_co_entry

Vladimir Sementsov-Ogievskiy (9):
block/io: refactor bdrv_is_allocated_above to run only one coroutine block/io: refactor bdrv_co_ioctl: move aio stuff to corresponding
block
block/io: move flush and pdiscard stuff down
block/io: move bdrv_rw_co_entry and friends down block/io: expand in_flight inc/dec section: simple cases block/io: expand in_flight inc/dec section: block-status block/io: add bdrv_do_pwrite_zeroes
block/io: move bdrv_make_zero under block-status block/io: expand in_flight inc/dec section: bdrv_make_zero

 block/io.c | 789 +++++++++++++++++++++++++++++++++++------------------
 1 file changed, 525 insertions(+), 264 deletions(-)
Signature · 1 line
2.21.0