From: Eric Blake <eblake@redhat.com>
To: Alberto Garcia <berto@igalia.com>, qemu-devel@nongnu.org
Cc: qemu-block@nongnu.org, Max Reitz <mreitz@redhat.com>,
Kevin Wolf <kwolf@redhat.com>,
Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v9 05/11] block: allow block jobs in any arbitrary node
Date: Fri, 29 Apr 2016 09:25:00 -0600 [thread overview]
Message-ID: <57237CCC.8000203@redhat.com> (raw)
In-Reply-To: <fc8559ce754d2679924881b76d1a6993041bcdf4.1459776815.git.berto@igalia.com>
[-- Attachment #1: Type: text/plain, Size: 2721 bytes --]
On 04/04/2016 07:43 AM, Alberto Garcia wrote:
> Currently, block jobs can only be owned by root nodes. This patch
> allows block jobs to be in any arbitrary node, by making the following
> changes:
>
> - Block jobs can now be identified by the node name of their
> BlockDriverState in addition to the device name. Since both device
> and node names live in the same namespace there's no ambiguity.
>
> - The "device" parameter used by all commands that operate on block
> jobs can also be a node name now.
>
> - The node name is used as a fallback to fill in the BlockJobInfo
> structure and all BLOCK_JOB_* events if there is no device name for
> that job.
Having more than one way to name a job might be okay for convenience,
but only if the canonical name is unambiguous. I agree with Kevin's
concern that using the device and/or node name as the canonical name of
the job is worrisome, because it locks us into having only one job with
that name at a time.
> +++ b/docs/qmp-events.txt
> @@ -92,7 +92,7 @@ Data:
>
> - "type": Job type (json-string; "stream" for image streaming
> "commit" for block commit)
> -- "device": Device name (json-string)
> +- "device": Device name, or node name if not present (json-string)
On the surface this sounds okay (you are promising to return a canonical
name, insofar as job canonical names are currently the node/device name
until the time that we allow job ids with multiple jobs per device) -
even if it means that you return a device name when the user started a
job based on a node name.
But I'm also worried about jobs where the node name tied to a device
changes over time (creating a snapshot, pivoting to a mirror, doing an
active commit with a pivot to the backing file - all of these are cases
where the device name stays the same, but the top node name associated
with the device differs over time). If the device name is the canonical
one, then a job started on node "A" but reported as device "D", needs to
STILL be known as job "D" even if by the end of the job node "A" is no
longer associated with device "D" (because "D" is now serving the
top-level node "B").
> @@ -1513,7 +1513,7 @@
> # the operation is actually paused. Cancelling a paused job automatically
> # resumes it.
> #
> -# @device: the device name
> +# @device: the device or node name of the owner of the block job.
We aren't consistent on whether to use a trailing '.'. I don't care
enough to standardize on a style, so no need to respin for just that.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]
next prev parent reply other threads:[~2016-04-29 15:25 UTC|newest]
Thread overview: 56+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-04 13:43 [Qemu-devel] [PATCH for-2.7 v9 00/11] Support streaming to an intermediate layer Alberto Garcia
2016-04-04 13:43 ` [Qemu-devel] [PATCH v9 01/11] block: keep a list of block jobs Alberto Garcia
2016-04-27 11:59 ` Max Reitz
2016-04-29 14:22 ` Kevin Wolf
2016-04-04 13:43 ` [Qemu-devel] [PATCH v9 02/11] block: use the block job list in bdrv_drain_all() Alberto Garcia
2016-04-27 12:04 ` Max Reitz
2016-04-27 12:08 ` Alberto Garcia
2016-04-29 14:25 ` Kevin Wolf
2016-04-04 13:43 ` [Qemu-devel] [PATCH v9 03/11] block: use the block job list in qmp_query_block_jobs() Alberto Garcia
2016-04-27 12:09 ` Max Reitz
2016-04-29 14:32 ` Kevin Wolf
2016-05-02 13:06 ` Alberto Garcia
2016-04-04 13:43 ` [Qemu-devel] [PATCH v9 04/11] block: use the block job list in bdrv_close() Alberto Garcia
2016-04-27 12:14 ` Max Reitz
2016-04-29 14:38 ` Kevin Wolf
2016-05-02 13:42 ` Alberto Garcia
2016-04-04 13:43 ` [Qemu-devel] [PATCH v9 05/11] block: allow block jobs in any arbitrary node Alberto Garcia
2016-04-27 12:30 ` Max Reitz
2016-04-27 14:59 ` Alberto Garcia
2016-04-29 15:00 ` Kevin Wolf
2016-05-06 10:00 ` Alberto Garcia
2016-05-06 17:54 ` John Snow
2016-05-09 7:06 ` Kevin Wolf
2016-05-09 11:59 ` Alberto Garcia
2016-04-29 15:25 ` Eric Blake [this message]
2016-04-04 13:43 ` [Qemu-devel] [PATCH v9 06/11] block: Support streaming to an intermediate layer Alberto Garcia
2016-04-27 13:04 ` Max Reitz
2016-04-28 9:23 ` Alberto Garcia
2016-04-29 15:07 ` Kevin Wolf
2016-04-04 13:43 ` [Qemu-devel] [PATCH v9 07/11] block: Add QMP support for " Alberto Garcia
2016-04-27 13:34 ` Max Reitz
2016-04-28 12:20 ` Alberto Garcia
2016-04-29 15:18 ` Kevin Wolf
2016-05-03 12:50 ` Alberto Garcia
2016-05-03 13:23 ` Kevin Wolf
2016-05-03 13:33 ` Alberto Garcia
2016-05-03 13:48 ` Kevin Wolf
2016-05-03 15:09 ` Alberto Garcia
[not found] ` <w517fezo0al.fsf@maestria.local.igalia.com>
2016-05-12 15:04 ` Kevin Wolf
[not found] ` <w514ma3nwbl.fsf@maestria.local.igalia.com>
2016-05-12 15:28 ` Kevin Wolf
2016-05-17 14:26 ` Alberto Garcia
2016-05-17 14:47 ` Kevin Wolf
2016-05-17 14:54 ` Alberto Garcia
2016-04-29 15:11 ` Kevin Wolf
2016-05-03 12:53 ` Alberto Garcia
2016-05-03 13:18 ` Kevin Wolf
2016-05-03 13:29 ` Alberto Garcia
2016-04-29 15:29 ` Eric Blake
2016-04-04 13:43 ` [Qemu-devel] [PATCH v9 08/11] docs: Document how to stream " Alberto Garcia
2016-04-04 13:43 ` [Qemu-devel] [PATCH v9 09/11] qemu-iotests: test streaming " Alberto Garcia
2016-04-04 13:44 ` [Qemu-devel] [PATCH v9 10/11] qemu-iotests: test overlapping block-stream operations Alberto Garcia
2016-04-27 13:48 ` Max Reitz
2016-04-27 15:02 ` Alberto Garcia
2016-04-04 13:44 ` [Qemu-devel] [PATCH v9 11/11] qemu-iotests: test non-overlapping " Alberto Garcia
2016-04-27 13:50 ` Max Reitz
2016-04-08 10:00 ` [Qemu-devel] [PATCH for-2.7 v9 00/11] Support streaming to an intermediate layer Stefan Hajnoczi
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=57237CCC.8000203@redhat.com \
--to=eblake@redhat.com \
--cc=berto@igalia.com \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
/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).