Skip to content

block jobs: Convert I/O to BlockBackend

Kevin Wolf qemu-devel 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest15 patches 12 repliesIn review
  2. v214 patches 23 repliesSuperseded
  3. v114 patches 18 repliesSuperseded

Changes in v3 from the cover letter

- Included Eric's "block: Rename blk_write_zeroes()" and rebased the rest on top of it in order to avoid merge conflicts [Eric]
- Build fix for tests/test-blockjob-txn [Changlong Xie]

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/15block: Rename blk_write_zeroes()block/block-backend.c block/parallels.c hw/scsi/scsi-disk.c +3 more+30 -301 reply
2/15block: keep a list of block jobsblockjob.c include/block/blockjob.h+27 -00 replies
3/15block: Cancel jobs first in bdrv_close_all()block.c blockjob.c include/block/blockjob.h+22 -211 reply
4/15block: Default to enabled write cache in blk_new()block/block-backend.c+2 -10 replies
5/15block: Convert block job core to BlockBackendblock/mirror.c blockjob.c include/block/blockjob.h+25 -181 reply
6/15block: Make blk_co_preadv/pwritev() publicblock/block-backend.c include/sysemu/block-backend.h trace-events+24 -73 replies
7/15stream: Use BlockBackend for I/Oblock/io.c block/stream.c include/block/block.h +1 more+9 -181 reply
8/15mirror: Allow target that already has a BlockBackendblock/mirror.c blockdev.c tests/qemu-iotests/041 +1 more+8 -600 replies
9/15mirror: Use BlockBackend for I/Oblock/mirror.c blockdev.c+40 -341 reply
10/15backup: Don't leak BackupBlockJob in error pathblock/backup.c+5 -20 replies
11/15backup: Pack Notifier within BackupBlockJobblock/backup.c+10 -90 replies
12/15backup: Remove bs parameter from backup_do_cow()block/backup.c+6 -70 replies
13/15backup: Use BlockBackend for I/Oblock/backup.c block/io.c blockdev.c +2 more+22 -401 reply
14/15commit: Use BlockBackend for I/Oblock/commit.c+33 -201 reply
15/15blockjob: Remove BlockJob.bsblockjob.c include/block/blockjob.h qemu-img.c +1 more+3 -42 replies

Reviews trailers per patch

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

PatchMax ReitzEric BlakeAlberto Garcia
1/15R-b
2/15R-b
3/15R-b R-b R-b
4/15R-b R-b
5/15R-b R-b R-b
6/15R-b R-b R-b
7/15R-b R-b R-b
8/15R-b
9/15R-b R-b
10/15R-b R-b
11/15R-b
12/15R-b R-b
13/15R-b R-b
14/15R-b R-b
15/15R-b R-b

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 v3 thread

Cover letter [Qemu-devel] [PATCH v3 00/15] block jobs: Convert I/O to BlockBackend

This series changes the block jobs so that they have a separate BlockBackend for every node on which they perform I/O. This doesn't only get us closer to the goal of only doing I/O through blk_*() from external sources (and block jobs are considered external), but can also later be used to use BlockBackend features for jobs: One could imagine replacing the very basic job throttling by the already existing and more advanced BlockBackend throttling, or using the BlockBackend error handling for block jobs.

This depends on my current block branch (because of the drain fixes).

v3:
- Included Eric's "block: Rename blk_write_zeroes()" and rebased the rest on top of it in order to avoid merge conflicts [Eric]
- Build fix for tests/test-blockjob-txn [Changlong Xie]

v2:
- Rebase conflict resolution, in particular:
* bdrv_new() without parameter
* blk_*write_zeroes() is sector based now
- Assert that all BDSes are gone after bdrv_close_all [Max, Berto]
- Don't add new sector based blk_* interfaces. Instead, blk_co_preadv/pwritev are made public. [Max]
- commit: Removed unnecessary cast [Max]
- commit: Use blk_* functions in commit_run() [Max]

Alberto Garcia (1):
block: keep a list of block jobs

Eric Blake (1):
block: Rename blk_write_zeroes()

John Snow (1):
backup: Pack Notifier within BackupBlockJob

Kevin Wolf (12):
block: Cancel jobs first in bdrv_close_all()
block: Default to enabled write cache in blk_new()
block: Convert block job core to BlockBackend
block: Make blk_co_preadv/pwritev() public
stream: Use BlockBackend for I/O
mirror: Allow target that already has a BlockBackend
mirror: Use BlockBackend for I/O
backup: Don't leak BackupBlockJob in error path
backup: Remove bs parameter from backup_do_cow()
backup: Use BlockBackend for I/O
commit: Use BlockBackend for I/O
blockjob: Remove BlockJob.bs

 block.c                        |  23 +---------
 block/backup.c                 |  71 +++++++++++++++--------------
 block/block-backend.c          |  38 +++++++++-------
 block/commit.c                 |  53 +++++++++++++---------
 block/io.c                     |  18 --------
 block/mirror.c                 | 100 +++++++++++++++++++----------------------
 block/parallels.c              |   4 +-
 block/stream.c                 |  15 ++++---
 blockdev.c                     |  12 +----
 blockjob.c                     |  62 ++++++++++++++++++-------
 hw/scsi/scsi-disk.c            |   2 +-
 include/block/block.h          |   4 --
 include/block/blockjob.h       |  23 +++++++++-
 include/sysemu/block-backend.h |  20 ++++++---
 qemu-img.c                     |   6 +--
 qemu-io-cmds.c                 |  22 ++++-----
 tests/qemu-iotests/041         |  27 -----------
 tests/qemu-iotests/041.out     |   4 +-
 tests/test-blockjob-txn.c      |   3 +-
 trace-events                   |   6 ++-
 20 files changed, 254 insertions(+), 259 deletions(-)
Signature · 1 line
1.8.3.1