From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44795) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aygqx-00029w-O9 for qemu-devel@nongnu.org; Fri, 06 May 2016 10:35:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aygql-000059-WD for qemu-devel@nongnu.org; Fri, 06 May 2016 10:35:34 -0400 References: <1461763231-17598-1-git-send-email-kwolf@redhat.com> <1461763231-17598-4-git-send-email-kwolf@redhat.com> <5534d6f4-fbbf-f66d-7f13-8e753ddb4001@redhat.com> <9a35a077-c765-ac14-d221-d9d9823bc800@redhat.com> <20160506133101.GJ5093@noname.redhat.com> From: Eric Blake Message-ID: <572CAB8A.1030402@redhat.com> Date: Fri, 6 May 2016 08:34:50 -0600 MIME-Version: 1.0 In-Reply-To: <20160506133101.GJ5093@noname.redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="MX93U8V8rOQTERhxOXnJBwP55UC9gcB0N" Subject: Re: [Qemu-devel] [PATCH v2 3/9] blockjob: Don't set iostatus of target List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf , Max Reitz Cc: qemu-block@nongnu.org, jcody@redhat.com, armbru@redhat.com, qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --MX93U8V8rOQTERhxOXnJBwP55UC9gcB0N Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 05/06/2016 07:31 AM, Kevin Wolf wrote: >> >> Maybe I need to take that back. Using e.g. blockdev-backup, you can >> indeed see the target in query-block. >> >> Where mnt is a file system and test.qcow2 is large enough such that an= >> ENOSPC will occur. >=20 > Hm... Let's pretend we didn't notice. In fact, I don't think this > behaviour is documented and it also doesn't make a lot of sense. >=20 > I would be surprised if libvirt made use of it, as there is still the > job iostatus which works in drive-* cases, too. >=20 > (Eric?) >=20 >> Before this patch, you can see "io-status": "nospace" in query-block f= or >> dst. After it, it says "io-status": "ok", and after the next it doesn'= t >> say anything about the status at all anymore. Here's what libvirt does with "io-status": qemuMonitorJSONGetBlockInfo(): /* Missing io-status indicates no error */ if ((status =3D virJSONValueObjectGetString(dev, "io-status"))) {= info->io_status =3D qemuMonitorBlockIOStatusToError(status); if (info->io_status < 0) goto cleanup; } Then it feeds info->io_status into qemuDomainGetDiskErrors(). However, I'm not sure I know the full context of your question - is io-status still available on the primary BDS, and we are only deleting it from a secondary spot used only during a job? I think libvirt is currently only checking the status of the BDS (ENOSPC when the primary runs out of room), not what happens during a block job. In fact, libvirt does not yet use 'blockdev-backup' at all, let alone blockdev-backup with 'on-target-error':'enospc' (it should, but that's a story for another day). >=20 > Simply letting the field disappear sounds like a nice solution. So at first glance, I think we're okay here, dropping io-status from the block job from this location and instead exposing it from a more natural spot in QMP. And in the worst case, we can use introspection to learn which of two spots exposes the information, if libvirt is trying to be portable to 2.6 and 2.7 at the same time. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --MX93U8V8rOQTERhxOXnJBwP55UC9gcB0N 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/ iQEcBAEBCAAGBQJXLKuKAAoJEKeha0olJ0Nq9x0H/3z4RPUZLE86RJJF6HjAhhtU NaTswRVgz9FSEA722DYjwJVbv3kQQKoe34RsFYVJ0SmV+rLp8nKgM0S28oZGluXy JYqITLmqSd/heRyO2Meo0CyP/b2XchLj/Tj7izzwvfRAHoe0UiVY6bgcq5hdbeKc G8YmYRL99/gEgBOyZJgvc3ZEUV4N1XkDLluAsx3yh4UG3wXpnJ4133p363xauM1H ncSnDTuJV4tX8KroM9rW+cvin/37jh5TzFcj2YhkWdDsURoYbeiCVvMXNtSlbH0M jgPfR3IE/Vt4XoXKlCif+2FT6OKvgaMrIpmEyr01c71zXrqdkX8dU8NPp7HlsSE= =t9vZ -----END PGP SIGNATURE----- --MX93U8V8rOQTERhxOXnJBwP55UC9gcB0N--