Received: from eggs.gnu.org ([2001:4830:134:3::10]:53720) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b0Veg-0008DJ-3b for qemu-devel@nongnu.org; Wed, 11 May 2016 11:02:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b0VeZ-000139-RW for qemu-devel@nongnu.org; Wed, 11 May 2016 11:02:28 -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> <20160506141236.GK5093@noname.redhat.com> From: Max Reitz Message-ID: <46558aa3-941c-34bf-d6d5-9f9601984c25@redhat.com> Date: Wed, 11 May 2016 17:02:07 +0200 MIME-Version: 1.0 In-Reply-To: <20160506141236.GK5093@noname.redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="67JMT2Uav63HUqq5VgW8D04RVBiPGgdcf" 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) --67JMT2Uav63HUqq5VgW8D04RVBiPGgdcf 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: <46558aa3-941c-34bf-d6d5-9f9601984c25@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> <9a35a077-c765-ac14-d221-d9d9823bc800@redhat.com> <20160506133101.GJ5093@noname.redhat.com> <20160506141236.GK5093@noname.redhat.com> In-Reply-To: <20160506141236.GK5093@noname.redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 06.05.2016 16:12, Kevin Wolf wrote: > Am 06.05.2016 um 15:40 hat Max Reitz geschrieben: >> 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= 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 se= t the >>>>>> iostatus for the internal BB of the job (which we can always do la= ter), >>>>>> but certainly not for a separate BB which the job doesn't even use= =2E >>>>>> >>>>>> 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. >>> >>> 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. >>> >>> I would be surprised if libvirt made use of it, as there is still the= >>> job iostatus which works in drive-* cases, too. >>> >>> (Eric?) >>> >>>> 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 does= n't >>>> say anything about the status at all anymore. >>> >>> 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, a= nd >> if you think dropping this is fine, then I guess it's fine with me, to= o, >> and my R-b stands. >=20 > But you don't have this information with the drive-* commands either. >=20 > I would be okay with reintroducing this information, but in the right > place. Modifying the guest device iostatus for block jobs certainly > isn't right. As discussed on IRC, that sounds right to me. Thus, have an explicit Reviewed-by: Max Reitz > Anyway, we need Eric's input to confirm that libvirt doesn't depend on > this. >=20 > Kevin >=20 --67JMT2Uav63HUqq5VgW8D04RVBiPGgdcf 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 iQEcBAEBCAAGBQJXM0lvAAoJEDuxQgLoOKytn0UH/2UDDZLlIjTQnqmsRccAfTAe PgJq6nyqz2z6YGVFyLjp3/53+uDI9zM9L4P0J5jZ3ovhDntvjToiA24o62zQnr8j ONTMYwMb+z9H4yqEbOuXZk8o7RDSzVHhWPapgbx5Yf+c/AWTRhMxOTlQTfO25FGc 7yIxcy5k+lkyvn+rWLFAXMk0unil5vlmN5FS4YtZQhXOAqNeF/+ataALH1dI6Yud ag+QQLFKwXr7s5BjuzjWm1bp3U1ZvQIKyUW9d2IceGQ4SbZDcI1EIDtHa/h563SJ dC2o2Cw548xuM3UGVpMam/2x5BIhKqjuUgbGxDCnigfZlRCxtvOciOvrUePhIBI= =vFwK -----END PGP SIGNATURE----- --67JMT2Uav63HUqq5VgW8D04RVBiPGgdcf--