From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48170) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1awAIf-0008UJ-AZ for qemu-devel@nongnu.org; Fri, 29 Apr 2016 11:25:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1awAIT-00031K-59 for qemu-devel@nongnu.org; Fri, 29 Apr 2016 11:25:43 -0400 References: From: Eric Blake Message-ID: <57237CCC.8000203@redhat.com> Date: Fri, 29 Apr 2016 09:25:00 -0600 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="FhAslIadU4aST2RwTGsj4tK5bnSpdrXO4" Subject: Re: [Qemu-devel] [PATCH v9 05/11] block: allow block jobs in any arbitrary node List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alberto Garcia , qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, Max Reitz , Kevin Wolf , Stefan Hajnoczi This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --FhAslIadU4aST2RwTGsj4tK5bnSpdrXO4 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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: >=20 > - 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. >=20 > - The "device" parameter used by all commands that operate on block > jobs can also be a node name now. >=20 > - 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: > =20 > - "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 automatic= ally > # 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. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --FhAslIadU4aST2RwTGsj4tK5bnSpdrXO4 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJXI3zNAAoJEKeha0olJ0NqbHMH/A45DOgKFN6+Uyb9B6VVZqRx QTWonvNeRnkOb0BwWvfGbSQMKGgZ1Caa2cNqgar/icd5N2P05kW+rZazKTE2ndK/ 92OjQx0sGimzGR3Z44ygKvMSW9JcMtNE3CVk52sBi/B5APT5Y/Wsd0VXfRwEl1U4 6nYYhSZaeN9BY8i5ZGs61EDlyJKAPGooEPMd4N3EhXDlgjIJtraRUZX2uIJKJRB8 ULiSRsu1YgjARG8v/Hb9kLucd9DDWYla94UUTkWaRdfeHeHooULTsFaBiA+LaLQr 6YULXK47I+7Ju/vaBhbwfjDT3FPD9LX+dc0O3WiC7fzk+PG9BOwMyBYf5j1oOfw= =MT8q -----END PGP SIGNATURE----- --FhAslIadU4aST2RwTGsj4tK5bnSpdrXO4--