From: Alberto Garcia <berto@igalia.com>
To: qemu-devel@nongnu.org
Cc: qemu-block@nongnu.org, Max Reitz <mreitz@redhat.com>,
Kevin Wolf <kwolf@redhat.com>, Eric Blake <eblake@redhat.com>,
Jeff Cody <jcody@redhat.com>, John Snow <jsnow@redhat.com>,
Alberto Garcia <berto@igalia.com>
Subject: [Qemu-devel] [PATCH v4 00/11] Allow creating block jobs with a user-defined ID
Date: Tue, 5 Jul 2016 17:28:51 +0300 [thread overview]
Message-ID: <cover.1467727577.git.berto@igalia.com> (raw)
Hi all,
block jobs are currently identified by the name of the block backend
of the BDS where the job was started.
The problem with this is that you cannot have block jobs on nodes
where there is no such name.
This series turns the 'id' field of the BlockJob structure into an
actual ID, it guarantees that is unique and always present and allows
the user to set it.
Berto
v4:
- Rebase on top of the current master
- Patch 4: Disallow null IDs in find_block_job().
- Patches 6-9: Clarify that if @job-id is missing the device name
will be used as job ID.
- Patch 11: Capitalize the first word in the description of the
'device' parameter.
v3: https://lists.gnu.org/archive/html/qemu-devel/2016-07/msg00121.html
- Instead of having separate 'id' and 'device' fields, use only the
former. If the ID is not specified by the user it defaults to the
device name to ensure backward compatibility.
- Patch 2:
- Don't create a new field, simply update the description and the
error messages.
- Patch 4:
- Now find_block_job() is simply a wrapper around block_job_get()
that acquires the AioContext.
- Patch 5:
- Allow setting the job ID but fall back to the device name if the
user doesn't provide one. Fix the tests where the default ID was
empty.
- Patches 10-14 [v2]:
- These are no longer necessary, there's no need to add a new 'id'
parameter to the 'block-job-*' QMP commands.
- Patch 10 [v3]:
- Make img_commit() set a job ID
- Patch 11 [v3]:
- Update the documentation of the QMP API to explain that the
'device' field is now an actual ID.
v2: https://lists.gnu.org/archive/html/qemu-devel/2016-06/msg06397.html
- Rebased on top of the current master
- Patch 2
- Now that job->id no longer holds the device name, replace
"The active block job for device '%s' cannot be completed"
with "The active block job '%s' cannot be completed"
in mirror_complete() and block_job_complete().
- Patch 4
- Keep using ERROR_CLASS_DEVICE_NOT_ACTIVE in find_block_job() and
change error path. [Max]
- Patch 6
- Fix merge conflicts after 274fcce.
- Patch 9
- Fix subject in commit message [Max]
- Patch 15
- Update iotests 109 and 156 [Max]
v1: https://lists.gnu.org/archive/html/qemu-devel/2016-06/msg02438.html
- Initial release
git backport-diff against v3:
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/11:[----] [--] 'stream: Fix prototype of stream_start()'
002/11:[----] [--] 'blockjob: Update description of the 'id' field'
003/11:[----] [--] 'blockjob: Add block_job_get()'
004/11:[0009] [FC] 'block: Use block_job_get() in find_block_job()'
005/11:[----] [--] 'blockjob: Add 'job_id' parameter to block_job_create()'
006/11:[0012] [FC] 'mirror: Add 'job-id' parameter to 'blockdev-mirror' and 'drive-mirror''
007/11:[0012] [FC] 'backup: Add 'job-id' parameter to 'blockdev-backup' and 'drive-backup''
008/11:[0008] [FC] 'stream: Add 'job-id' parameter to 'block-stream''
009/11:[0012] [FC] 'commit: Add 'job-id' parameter to 'block-commit''
010/11:[----] [--] 'qemu-img: Set the ID of the block job in img_commit()'
011/11:[0020] [FC] 'blockjob: Update description of the 'device' field in the QMP API'
Alberto Garcia (11):
stream: Fix prototype of stream_start()
blockjob: Update description of the 'id' field
blockjob: Add block_job_get()
block: Use block_job_get() in find_block_job()
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'
commit: Add 'job-id' parameter to 'block-commit'
qemu-img: Set the ID of the block job in img_commit()
blockjob: Update description of the 'device' field in the QMP API
block/backup.c | 9 ++--
block/commit.c | 7 +--
block/mirror.c | 22 +++++----
block/stream.c | 12 ++---
blockdev.c | 113 ++++++++++++++++++++++------------------------
blockjob.c | 39 ++++++++++++++--
docs/qmp-events.txt | 12 +++--
hmp.c | 6 +--
include/block/block_int.h | 47 +++++++++++--------
include/block/blockjob.h | 23 +++++++---
include/qapi/qmp/qerror.h | 3 --
qapi/block-core.json | 72 +++++++++++++++++++++--------
qemu-img.c | 2 +-
qmp-commands.hx | 28 ++++++++----
tests/test-blockjob-txn.c | 7 ++-
15 files changed, 249 insertions(+), 153 deletions(-)
--
2.8.1
next reply other threads:[~2016-07-05 14:30 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-05 14:28 Alberto Garcia [this message]
2016-07-05 14:28 ` [Qemu-devel] [PATCH v4 01/11] stream: Fix prototype of stream_start() Alberto Garcia
2016-07-05 14:28 ` [Qemu-devel] [PATCH v4 02/11] blockjob: Update description of the 'id' field Alberto Garcia
2016-07-05 14:28 ` [Qemu-devel] [PATCH v4 03/11] blockjob: Add block_job_get() Alberto Garcia
2016-07-05 14:28 ` [Qemu-devel] [PATCH v4 04/11] block: Use block_job_get() in find_block_job() Alberto Garcia
2016-07-05 14:28 ` [Qemu-devel] [PATCH v4 05/11] blockjob: Add 'job_id' parameter to block_job_create() Alberto Garcia
2016-07-05 14:28 ` [Qemu-devel] [PATCH v4 06/11] mirror: Add 'job-id' parameter to 'blockdev-mirror' and 'drive-mirror' Alberto Garcia
2016-07-05 15:41 ` Max Reitz
2016-07-05 14:28 ` [Qemu-devel] [PATCH v4 07/11] backup: Add 'job-id' parameter to 'blockdev-backup' and 'drive-backup' Alberto Garcia
2016-07-05 15:44 ` Max Reitz
2016-07-05 14:28 ` [Qemu-devel] [PATCH v4 08/11] stream: Add 'job-id' parameter to 'block-stream' Alberto Garcia
2016-07-05 15:45 ` Max Reitz
2016-07-05 14:29 ` [Qemu-devel] [PATCH v4 09/11] commit: Add 'job-id' parameter to 'block-commit' Alberto Garcia
2016-07-05 15:46 ` Max Reitz
2016-07-05 14:29 ` [Qemu-devel] [PATCH v4 10/11] qemu-img: Set the ID of the block job in img_commit() Alberto Garcia
2016-07-05 15:56 ` Max Reitz
2016-07-06 12:07 ` Alberto Garcia
2016-07-05 14:29 ` [Qemu-devel] [PATCH v4 11/11] blockjob: Update description of the 'device' field in the QMP API Alberto Garcia
2016-07-07 12:48 ` [Qemu-devel] [PATCH v4 00/11] Allow creating block jobs with a user-defined ID Kevin Wolf
2016-07-07 15:12 ` Alberto Garcia
2016-07-07 15:34 ` John Snow
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1467727577.git.berto@igalia.com \
--to=berto@igalia.com \
--cc=eblake@redhat.com \
--cc=jcody@redhat.com \
--cc=jsnow@redhat.com \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).