Received: from eggs.gnu.org ([2001:4830:134:3::10]:43893) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1brrnh-0006EE-4V for qemu-devel@nongnu.org; Wed, 05 Oct 2016 15:24:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1brrnf-0001A9-N0 for qemu-devel@nongnu.org; Wed, 05 Oct 2016 15:24:20 -0400 References: <1475272849-19990-1-git-send-email-jsnow@redhat.com> <1475272849-19990-3-git-send-email-jsnow@redhat.com> <20161005134312.GA1657@noname.str.redhat.com> <0e9d9739-b32b-8cff-3e34-ccc8e971b4c3@redhat.com> From: Eric Blake Message-ID: Date: Wed, 5 Oct 2016 14:24:05 -0500 MIME-Version: 1.0 In-Reply-To: <0e9d9739-b32b-8cff-3e34-ccc8e971b4c3@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="11qLhtH40clVvkTMXm7Uk5cGekaMHgKCB" Subject: Re: [Qemu-devel] [PATCH v2 02/11] blockjob: centralize QMP event emissions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: John Snow , Kevin Wolf Cc: vsementsov@virtuozzo.com, famz@redhat.com, qemu-block@nongnu.org, jcody@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com, Wen Congyang This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --11qLhtH40clVvkTMXm7Uk5cGekaMHgKCB From: Eric Blake To: John Snow , Kevin Wolf Cc: vsementsov@virtuozzo.com, famz@redhat.com, qemu-block@nongnu.org, jcody@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com, Wen Congyang Message-ID: Subject: Re: [Qemu-devel] [PATCH v2 02/11] blockjob: centralize QMP event emissions References: <1475272849-19990-1-git-send-email-jsnow@redhat.com> <1475272849-19990-3-git-send-email-jsnow@redhat.com> <20161005134312.GA1657@noname.str.redhat.com> <0e9d9739-b32b-8cff-3e34-ccc8e971b4c3@redhat.com> In-Reply-To: <0e9d9739-b32b-8cff-3e34-ccc8e971b4c3@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 10/05/2016 01:49 PM, John Snow wrote: >> Here we have an additional caller in block/replication.c and qemu-img,= >> so the parameters must stay. For qemu-img, nothing changes. For >> replication, the block job events are added as a side effect. >> >> Not sure if we want to emit such events for an internal block job, but= >> if we do want the change, it should be explicit. >> >=20 > Hmm, do we want to make it so some jobs are invisible and others are > not? Because as it stands right now, neither case is strictly true. We > only emit cancelled/completed events if it was started via QMP, however= > we do emit events for error and ready regardless of who started the job= =2E Libvirt tries to mirror any block job event it receives to upper layers. But if it cannot figure out which upper-layer disk the event is associated with, it just drops the event. So I think that from the libvirt perspective, you are okay if if you always report job events, even for internal jobs. (Do we have a quick and easy way to set up an internal job event, to double-check if I can produce some sort of libvirt scenario to trigger the event and see that it gets safely ignored= ?) >=20 > That didn't seem particularly consistent to me; either all events shoul= d > be controlled by the job layer itself or none of them should be. >=20 > I opted for "all." >=20 > For "internal" jobs that did not previously emit any events, is it not > true that these jobs still appear in the block job list and are > effectively public regardless? I'd argue that these messages may be of > value for management utilities who are still blocked by these jobs > whether or not they are 'internal' or not. >=20 > I'll push for keeping it mandatory and explicit. If it becomes a > problem, we can always add a 'silent' job property that silences ALL qm= p > events, including all completion, error, and ready notices. Completely silencing an internal job seems a little cleaner than having events for the job but not being able to query it. But if nothing breaks by exposing the internal jobs, that seems even easier than trying to decide which jobs are internal and hidden vs. user-requested and publi= c. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --11qLhtH40clVvkTMXm7Uk5cGekaMHgKCB 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/ iQEcBAEBCAAGBQJX9VNVAAoJEKeha0olJ0NqktQH/Aplojz6E5+XgJTR2P8tFipr zldbYHvr1F7cC2upOW3TyWmnxg8BO1XXhF4CmszGHNrFvbqj2nOtg0eL8n+LqiZe IE9z0yZnzw3V89M+zIkfVqcJQ80ezQ36HmJ4O2BzOpO0NfZB/1lFVD2U20s7IuAL SSVkvVsmg0bfEy/CoHDuuOBAu7HcYlPXXWrGK1Wc+zps1kqzzFQFD3C6GRkuWaiz 8XTiYdP7qV69Cl1amzqt75UPDPgBDkc7YVTgKpHTBGaJnrQiR8vDlw9E1RBjfeql XIqdp3Wj8IiOClbDQXVMwwS9Yo6UdpiN4MKJkSeOBQlhcStqzdG9Iu5+4c/4sQ4= =J6N4 -----END PGP SIGNATURE----- --11qLhtH40clVvkTMXm7Uk5cGekaMHgKCB--