qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 00/15] Add an 'id' field to block jobs
@ 2016-06-09  8:20 Alberto Garcia
  2016-06-09  8:20 ` [Qemu-devel] [PATCH 01/15] stream: Fix prototype of stream_start() Alberto Garcia
                   ` (14 more replies)
  0 siblings, 15 replies; 44+ messages in thread
From: Alberto Garcia @ 2016-06-09  8:20 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-block, Max Reitz, Kevin Wolf, Eric Blake, Jeff Cody,
	Alberto Garcia

Hello all,

Block jobs are currently identified by the name of the block backend
of the BDS where the job was started.

This series adds a new 'id' field that is specific to the block job
and guaranteed to be unique and always present.

The patches can be summarized as follows:

- 1: Fix the prototype of stream_start(), that is going to be touched
     by a later patch in the series.
- 2-5: Split BlockJob's 'id' field into 'id' and 'device' and adjust
       the internal APIs to allow using the job ID.
- 6-9: Add parameters to allow setting the job ID to all QMP commands
       that create block jobs (block-stream, block-commit, ...)
- 10-14: Add parameters to allow using the job ID to all QMP command
         that manipulate block jobs (cancel, pause, complete, ...).
- 15: Expose the ID field in BlockJobInfo and all BLOCK_JOB_* events.

Things to do:

- Add new tests specific to job IDs.
- Add job ID support to HMP commands.

The series applies on top of Max's block branch (commit 3cc2f35a59)
but it should work on master as well.

Questions, comments, etc, are welcome.

Thanks!

Berto

Alberto Garcia (15):
  stream: Fix prototype of stream_start()
  blockjob: Decouple the ID from the device name in the BlockJob struct
  blockjob: Add block_job_get()
  block: Simplify find_block_job() and make it accept a job ID
  blockjob: Add 'job_id' parameter to block_job_create()
  mirror: Add 'job-id' parameter to 'blockdev-mirror' and 'drive-mirror'
  backup: Add 'job-id' parameter to 'blockdev-backup' and 'drive-backup'
  stream: Add 'job-id' parameter to 'block-stream'
  stream: Add 'job-id' parameter to 'block-commit'
  blockjob: Add 'id' parameter to 'block-job-set-speed'
  blockjob: Add 'id' parameter to 'block-job-cancel'
  blockjob: Add 'id' parameter to 'block-job-pause'
  blockjob: Add 'id' parameter to 'block-job-resume'
  blockjob: Add 'id' parameter to 'block-job-complete'
  blockjob: Add 'id' field to 'BlockJobInfo' and all BLOCK_JOB_* events

 block/backup.c             |   9 +--
 block/commit.c             |   7 +-
 block/mirror.c             |  18 ++---
 block/stream.c             |  12 ++--
 blockdev.c                 | 164 ++++++++++++++++++++++++++-------------------
 blockjob.c                 |  43 ++++++++++--
 docs/qmp-events.txt        |   4 ++
 hmp.c                      |  16 ++---
 include/block/block_int.h  |  47 ++++++++-----
 include/block/blockjob.h   |  30 +++++++--
 include/qemu/id.h          |   1 +
 qapi/block-core.json       |  91 +++++++++++++++++++------
 qemu-img.c                 |   2 +-
 qmp-commands.hx            |  32 +++++----
 tests/qemu-iotests/095     |   2 +-
 tests/qemu-iotests/095.out |   2 +-
 tests/qemu-iotests/124     |   3 +-
 tests/qemu-iotests/141     |   6 +-
 tests/qemu-iotests/141.out |  14 ++--
 tests/qemu-iotests/144     |   1 +
 tests/qemu-iotests/144.out |   4 +-
 tests/test-blockjob-txn.c  |   2 +-
 util/id.c                  |   1 +
 23 files changed, 334 insertions(+), 177 deletions(-)

-- 
2.8.1

^ permalink raw reply	[flat|nested] 44+ messages in thread

end of thread, other threads:[~2016-06-22  7:32 UTC | newest]

Thread overview: 44+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-09  8:20 [Qemu-devel] [PATCH 00/15] Add an 'id' field to block jobs Alberto Garcia
2016-06-09  8:20 ` [Qemu-devel] [PATCH 01/15] stream: Fix prototype of stream_start() Alberto Garcia
2016-06-20 16:07   ` Max Reitz
2016-06-09  8:20 ` [Qemu-devel] [PATCH 02/15] blockjob: Decouple the ID from the device name in the BlockJob struct Alberto Garcia
2016-06-20 16:17   ` Max Reitz
2016-06-21 11:42     ` Alberto Garcia
2016-06-09  8:20 ` [Qemu-devel] [PATCH 03/15] blockjob: Add block_job_get() Alberto Garcia
2016-06-20 16:24   ` Max Reitz
2016-06-20 18:48     ` Eric Blake
2016-06-20 19:06       ` Max Reitz
2016-06-21 12:09     ` Alberto Garcia
2016-06-09  8:20 ` [Qemu-devel] [PATCH 04/15] block: Simplify find_block_job() and make it accept a job ID Alberto Garcia
2016-06-20 16:40   ` Max Reitz
2016-06-20 18:29     ` Max Reitz
2016-06-21 12:59     ` Alberto Garcia
2016-06-20 18:53   ` Eric Blake
2016-06-21 12:27     ` Alberto Garcia
2016-06-21 21:36       ` Eric Blake
2016-06-22  7:32         ` Alberto Garcia
2016-06-09  8:20 ` [Qemu-devel] [PATCH 05/15] blockjob: Add 'job_id' parameter to block_job_create() Alberto Garcia
2016-06-20 17:11   ` Max Reitz
2016-06-09  8:20 ` [Qemu-devel] [PATCH 06/15] mirror: Add 'job-id' parameter to 'blockdev-mirror' and 'drive-mirror' Alberto Garcia
2016-06-20 17:33   ` Max Reitz
2016-06-20 17:34     ` Max Reitz
2016-06-20 18:56   ` Eric Blake
2016-06-09  8:20 ` [Qemu-devel] [PATCH 07/15] backup: Add 'job-id' parameter to 'blockdev-backup' and 'drive-backup' Alberto Garcia
2016-06-20 18:14   ` Max Reitz
2016-06-09  8:20 ` [Qemu-devel] [PATCH 08/15] stream: Add 'job-id' parameter to 'block-stream' Alberto Garcia
2016-06-20 18:16   ` Max Reitz
2016-06-09  8:20 ` [Qemu-devel] [PATCH 09/15] stream: Add 'job-id' parameter to 'block-commit' Alberto Garcia
2016-06-20 18:22   ` Max Reitz
2016-06-09  8:20 ` [Qemu-devel] [PATCH 10/15] blockjob: Add 'id' parameter to 'block-job-set-speed' Alberto Garcia
2016-06-20 18:31   ` Max Reitz
2016-06-09  8:20 ` [Qemu-devel] [PATCH 11/15] blockjob: Add 'id' parameter to 'block-job-cancel' Alberto Garcia
2016-06-20 18:32   ` Max Reitz
2016-06-09  8:20 ` [Qemu-devel] [PATCH 12/15] blockjob: Add 'id' parameter to 'block-job-pause' Alberto Garcia
2016-06-20 18:34   ` Max Reitz
2016-06-09  8:20 ` [Qemu-devel] [PATCH 13/15] blockjob: Add 'id' parameter to 'block-job-resume' Alberto Garcia
2016-06-20 18:36   ` Max Reitz
2016-06-09  8:20 ` [Qemu-devel] [PATCH 14/15] blockjob: Add 'id' parameter to 'block-job-complete' Alberto Garcia
2016-06-20 18:37   ` Max Reitz
2016-06-09  8:20 ` [Qemu-devel] [PATCH 15/15] blockjob: Add 'id' field to 'BlockJobInfo' and all BLOCK_JOB_* events Alberto Garcia
2016-06-20 19:14   ` Max Reitz
2016-06-21 14:23     ` Alberto Garcia

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).