Received: from eggs.gnu.org ([2001:4830:134:3::10]:41792) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ayewU-0000bF-4L for qemu-devel@nongnu.org; Fri, 06 May 2016 08:33:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ayewI-0003re-G7 for qemu-devel@nongnu.org; Fri, 06 May 2016 08:33:08 -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> From: Max Reitz Message-ID: <9a35a077-c765-ac14-d221-d9d9823bc800@redhat.com> Date: Fri, 6 May 2016 14:32:24 +0200 MIME-Version: 1.0 In-Reply-To: <5534d6f4-fbbf-f66d-7f13-8e753ddb4001@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="7E1NuiDP4I9w84UhODsU8Iu7uX8uOqwvJ" 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 , qemu-block@nongnu.org Cc: jcody@redhat.com, armbru@redhat.com, eblake@redhat.com, qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --7E1NuiDP4I9w84UhODsU8Iu7uX8uOqwvJ Content-Type: multipart/mixed; boundary="hmX6BmSrlt3cUwoGpsMP8Bmfspp2PTenA" From: Max Reitz To: Kevin Wolf , qemu-block@nongnu.org Cc: jcody@redhat.com, armbru@redhat.com, eblake@redhat.com, qemu-devel@nongnu.org Message-ID: <9a35a077-c765-ac14-d221-d9d9823bc800@redhat.com> Subject: Re: [PATCH v2 3/9] blockjob: Don't set iostatus of target 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> In-Reply-To: <5534d6f4-fbbf-f66d-7f13-8e753ddb4001@redhat.com> --hmX6BmSrlt3cUwoGpsMP8Bmfspp2PTenA Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: quoted-printable On 06.05.2016 14:01, Max Reitz wrote: > On 27.04.2016 15:20, Kevin Wolf wrote: >> When block job errors were introduced, we assigned the iostatus of the= >> target BDS "just in case". The field has never been accessible for the= >> user because the target isn't listed in query-block. >> >> Before we can allow the user to have a second BlockBackend on the >> target, we need to clean this up. If anything, we would want to set th= e >> iostatus for the internal BB of the job (which we can always do later)= , >> but certainly not for a separate BB which the job doesn't even use. >> >> As a nice side effect, this gets us rid of another bs->blk use. >> >> Signed-off-by: Kevin Wolf >> --- >> block/backup.c | 8 ++++---- >> block/mirror.c | 8 ++++---- >> block/stream.c | 3 +-- >> blockjob.c | 6 +----- >> include/block/blockjob.h | 4 +--- >> 5 files changed, 11 insertions(+), 18 deletions(-) >=20 > Reviewed-by: Max Reitz Maybe I need to take that back. Using e.g. blockdev-backup, you can indeed see the target in query-block. e.g.: (echo "{'execute':'qmp_capabilities'} {'execute':'blockdev-backup', 'arguments':{'device':'src','target':'dst', 'sync':'full','on-target-error':'enospc'}}"; sleep 1; echo "{'execute':'query-block'}") | \ x86_64-softmmu/qemu-system-x86_64 \ -drive if=3Dnone,id=3Dsrc,file=3Dtest.qcow2 \ -drive if=3Dnone,id=3Ddst,file=3Dmnt/out.qcow2 \ -qmp-pretty stdio -nodefaults Where mnt is a file system and test.qcow2 is large enough such that an ENOSPC will occur. Before this patch, you can see "io-status": "nospace" in query-block for dst. After it, it says "io-status": "ok", and after the next it doesn't say anything about the status at all anymore. Max --hmX6BmSrlt3cUwoGpsMP8Bmfspp2PTenA-- --7E1NuiDP4I9w84UhODsU8Iu7uX8uOqwvJ 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 iQEcBAEBCAAGBQJXLI7YAAoJEDuxQgLoOKytmWcIAJoJAON6t31pqatz2h1X5tF1 r4iGToNniqVEB5c2Ci519t1roSkuaZe1oZSjZx4JMarPaliLu6sMeAMjiXdZt3oH YMvwtJXafii9APCO9iDyrnF0SoXVLq+srQc3BFv7JaRXyGIH9Pxy0mqBCrvl1Cyf U2TFtx244MLE3PWL9KX1OCX0+4nPilSgPRIkWl9bdlgCzOq+WlIs0BUGWGJDYUX6 /1nNlbopEjU3YhSNvje8i5KnM1TYkDRuMs9Y/1FuWMM2do5zPz5DwbpKcm4r3XpH dUFIQu9TWl+6FqNHx4osgUw/SfTV5KlS61p7wSJZgZ4S3d9Atb6gg6oBnyJjVxo= =y8NN -----END PGP SIGNATURE----- --7E1NuiDP4I9w84UhODsU8Iu7uX8uOqwvJ--