Skip to content

block: reduce reliance on bs->job pointer

John Snow qemu-devel 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest5 patches 3 repliesIn review
  2. v15 patches 7 repliesSuperseded

Changes in v2 from the cover letter

===

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5block: Allow mirror_start to return job referencesblock/mirror.c blockdev.c include/block/block_int.h +1 more+59 -430 replies
2/5block: Allow stream_start to return job referencesblock/stream.c blockdev.c include/block/block_int.h+15 -100 replies
3/5block: allow backup_start to return job referencesblock/backup.c blockdev.c include/block/block_int.h+120 -1000 replies
4/5block/backup: Pack Notifier within BackupBlockJobblock/backup.c+11 -91 reply
5/5blockjob: add Job parameter to BlockCompletionFuncblock/backup.c block/commit.c block/mirror.c +8 more+37 -281 reply

Reviews trailers per patch

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

PatchKevin WolfFam Zheng
1/5R-b
2/5R-b
3/5R-b
4/5R-b
5/5R-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 [Qemu-devel] [PATCH v2 0/5] block: reduce reliance on bs->job pointer

This is a small collection of patches to reduce our use of the bs->job pointer where possible. There are still more usages in the code, but this cuts down on a few.

The goal is to eventually eliminate all of them and allow multiple block jobs to run concurrently, but design on what that will look like is on-going.

In the meantime, eliminate a few obviously needless references to bs->job by allowing more systems to carry pointers to jobs directly instead of trying to fish the pointer out of the BDS all the time.

===
v2:
===

Key:
[----] : patches are identical
[####] : number of functional differences between upstream/downstream patch [down] : patch is downstream-only
The flags [FC] indicate (F)unctional and (C)ontextual differences, respectively

001/5:[----] [--] 'block: Allow mirror_start to return job references' 002/5:[----] [--] 'block: Allow stream_start to return job references' 003/5:[----] [--] 'block: allow backup_start to return job references' 004/5:[down] 'block/backup: Pack Notifier within BackupBlockJob' 005/5:[0006] [FC] 'blockjob: add Job parameter to BlockCompletionFunc'

4: Rewritten to pack the notifier within the job, instead of the job within
a subclassed notifier. [Paolo]
5: Remove junk assert and extraneous local BDS variable. [Kevin]

________________________________________________________________________________

For convenience, this branch is available at:
https://github.com/jnsnow/qemu.git branch block-multijob2
https://github.com/jnsnow/qemu/tree/block-multijob2

This version is tagged block-multijob2-v2:
https://github.com/jnsnow/qemu/releases/tag/block-multijob2-v2

John Snow (5):
block: Allow mirror_start to return job references
block: Allow stream_start to return job references
block: allow backup_start to return job references block/backup: Pack Notifier within BackupBlockJob
blockjob: add Job parameter to BlockCompletionFunc

 block/backup.c            |  58 +++++++------
 block/commit.c            |   2 +-
 block/mirror.c            |  74 ++++++++--------
 block/stream.c            |  10 ++-
 blockdev.c                | 210 +++++++++++++++++++++++++---------------------
 blockjob.c                |  13 ++-
 include/block/block.h     |   2 +
 include/block/block_int.h |  27 +++---
 include/block/blockjob.h  |   6 +-
 qemu-img.c                |  16 ++--
 tests/test-blockjob-txn.c |   4 +-
 11 files changed, 237 insertions(+), 185 deletions(-)
Signature · 1 line
2.4.3