Received: from eggs.gnu.org ([2001:4830:134:3::10]:57903) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ayfrL-0002ox-SY for qemu-devel@nongnu.org; Fri, 06 May 2016 09:32:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ayfrA-0005kF-3w for qemu-devel@nongnu.org; Fri, 06 May 2016 09:31:54 -0400 Date: Fri, 6 May 2016 15:31:01 +0200 From: Kevin Wolf Message-ID: <20160506133101.GJ5093@noname.redhat.com> 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> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="yrj/dFKFPuw6o+aM" Content-Disposition: inline In-Reply-To: <9a35a077-c765-ac14-d221-d9d9823bc800@redhat.com> 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: Max Reitz Cc: qemu-block@nongnu.org, jcody@redhat.com, armbru@redhat.com, eblake@redhat.com, qemu-devel@nongnu.org --yrj/dFKFPuw6o+aM Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 set the > >> 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 >=20 > Maybe I need to take that back. Using e.g. blockdev-backup, you can > indeed see the target in query-block. >=20 > e.g.: >=20 > (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 >=20 > 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 doesn't > say anything about the status at all anymore. Simply letting the field disappear sounds like a nice solution. Kevin --yrj/dFKFPuw6o+aM Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAEBAgAGBQJXLJyVAAoJEH8JsnLIjy/WQEcP/RAh4EksPuztv3r0bSeEydNs tpniE5sQfxN+MPRJGGB6NmK2un/vuRxYg2+03AZAo61vEML/KzBxZqrRvqA3Z28K MgVZHHW6Gn9/CI9x6L+0K52OLksE/lUcfz9ClKPpys9Eg5weWY79f6NnbLp7sVbd jzvZt9Xy7dhOkmuDVq1zpUh+EBQs2K3ZhuH2rvbLLeF6FEPTteTM3iXlrmkqS4lu yqfJX1Xkhp+AlXPdfumLqdeUgpgryDqyUa5wbfSLcOaIg8MtGwbj1CsvYKAM0VSS owHgQ+kf2XJxN3N6wEwzTHyil2WuDRR17iVgfip2D5kb/Hpuh4ajOOLKHfQocNOM 53LiUTDX6B4dMAAcAF+vhG5ZlS9YeGGkxR3CzkrZTTzm+5pBoh0Af0JZw20IfbjI 57oSbI/btt1lTJWNW/2ro8VoZoq/qx6zOrqXddk433gEisuexF8LY34wmN37rB44 OSJVCieiAB3j2x7iNjj4hSEkHKgtCg7SNBUvc8WmHV5VYyEeLYcGyGoFC/1iexhy zq0J0EA0uN3BlMRignwkrbpCvYonyJ8Pqt1Z91nD7tfPagv6XOrUxcSLzuBpK2ms SufF+CAhobn3tsqGUpFphnZheE+Bf3d+syk17QfYdS6rYctEOgGwjyFwXlJusVAZ GtChAm6Ui4WIKxiu9HrZ =fsMF -----END PGP SIGNATURE----- --yrj/dFKFPuw6o+aM--