Received: from eggs.gnu.org ([2001:4830:134:3::10]:60033) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ayg0a-0006sS-Al for qemu-devel@nongnu.org; Fri, 06 May 2016 09:41:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ayg0F-000055-Ag for qemu-devel@nongnu.org; Fri, 06 May 2016 09:41:26 -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: Max Reitz Message-ID: Date: Fri, 6 May 2016 15:40:31 +0200 MIME-Version: 1.0 In-Reply-To: <20160506133101.GJ5093@noname.redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="v0thPA397C0cu0WDFl9meQP1jHbWxdofk" 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 Cc: qemu-block@nongnu.org, jcody@redhat.com, armbru@redhat.com, eblake@redhat.com, qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --v0thPA397C0cu0WDFl9meQP1jHbWxdofk Content-Type: multipart/mixed; boundary="CW2WjwEA69gUN4L1erF54UJrXRwEFExDT" From: Max Reitz To: Kevin Wolf Cc: qemu-block@nongnu.org, jcody@redhat.com, armbru@redhat.com, eblake@redhat.com, qemu-devel@nongnu.org Message-ID: 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> <9a35a077-c765-ac14-d221-d9d9823bc800@redhat.com> <20160506133101.GJ5093@noname.redhat.com> In-Reply-To: <20160506133101.GJ5093@noname.redhat.com> --CW2WjwEA69gUN4L1erF54UJrXRwEFExDT Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 06.05.2016 15:31, Kevin Wolf wrote: > Am 06.05.2016 um 14:32 hat Max Reitz geschrieben: >> 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 t= he >>>> target BDS "just in case". The field has never been accessible for t= he >>>> 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 = the >>>> iostatus for the internal BB of the job (which we can always do late= r), >>>> 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(-) >>> >>> 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. >=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. >=20 > Simply letting the field disappear sounds like a nice solution. I'm not sure I completely agree with that because the iostatus appears to be the only way of obtaining the information whether the block job stopped because of an ENOSPC or because of something different (the BLOCK_JOB_ERROR doesn't tell you). I don't know whether anyone actually needs that information, though, and if you think dropping this is fine, then I guess it's fine with me, too, and my R-b stands. Max --CW2WjwEA69gUN4L1erF54UJrXRwEFExDT-- --v0thPA397C0cu0WDFl9meQP1jHbWxdofk 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 iQEcBAEBCAAGBQJXLJ7PAAoJEDuxQgLoOKytnIwH+wULPt6/5k+V10DZfi2ksbZR etPblZSd2NIec2Jw2sgeaEs7xEXYw3SEmKjg8x8BG66RHwVXMFQHcg9Lr5IsOEcX cnudVT8U2iTCQQsPmVxwwpWRpN0lkuXDL9f4f8ivHy2jpiORV1ol/5ibnYQderAZ UU7Mi9NE588KB8nTBb7CoKMikVDzjc105DG8wRB+2FK8uuLipez7eyXKPjxaY5wZ aGP9dqxskr783wImeFyx7pWj1kY+c7Mm4976fM41mcNkTM4DfvSRLJHqWqjqFtfy jFm5+ENXROhi1b1Kp6tIZlY+l781qXezEKvIl5cPCXhHkFKdk4+asaMy6JU6EyM= =x9uw -----END PGP SIGNATURE----- --v0thPA397C0cu0WDFl9meQP1jHbWxdofk--