Received: from eggs.gnu.org ([2001:4830:134:3::10]:39550) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aygVR-0006EL-K8 for qemu-devel@nongnu.org; Fri, 06 May 2016 10:13:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aygVF-0001Sd-S2 for qemu-devel@nongnu.org; Fri, 06 May 2016 10:13:20 -0400 Date: Fri, 6 May 2016 16:12:36 +0200 From: Kevin Wolf Message-ID: <20160506141236.GK5093@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> <20160506133101.GJ5093@noname.redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="oLBj+sq0vYjzfsbl" Content-Disposition: inline In-Reply-To: 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 --oLBj+sq0vYjzfsbl Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 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. >=20 > 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). >=20 > 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. But you don't have this information with the drive-* commands either. 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. Anyway, we need Eric's input to confirm that libvirt doesn't depend on this. Kevin --oLBj+sq0vYjzfsbl Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAEBAgAGBQJXLKZUAAoJEH8JsnLIjy/WMEgP/3tKKHpxiNcNahGzd6+vEjrK pVbY/TTBQlBKRU2S81Lboi4TIMC6uxkXZUzHi85aYfYMv6AbKFte4vJpVWlu0c4D xYEqJ/AmtWVgq/6D0w/gKmnScEeW6rUrmPsufspLd2SgX5vdtjCS9u/EEZBOgNS3 bs0fkHNpVl8TIPFphKqIQyqndiWq7J/zAefyWutkX44qcfUewbO1NK+N6ihwvMPR JFZxW9nYRZOQ6Aa22KNYXJEYDqa1uKwRvTSFluUe65pX6YQ6hxjzZhcv+O3GwfgH MYGgi1XLDfjC6z3l80SNvtKE8Q0WNNye5zJaQJkgKdgQhnKebixpLTcXwKUkSTf9 IeBZT/r1bLDOaCL+T5rDCfgklPs5OKT9YdV5EATRLIyqMJW+wBhJuJMwFTPg5Zwu PrWcsWPLynpkyYc3LH5Z7TljXokOj/MPSxXKhBGwf+Ti58i0P49cGyLfyWmpWZyZ z8J/hCdMYT7T7CJ8ntoIrOOfqZTYeGuY1/hdYpOWMStvrBb8JeYqhorpXTwDI73o H4DnLJ10MbstsZm0zuWJuNlqUTb8ciRqNZ6pnO9doqRVW87zmQYCGjEkpMoB4Lqv G12MhbbbjHJco2S6bEzJYYNvflxg6lDOrimARjn0sdcHwY5LySG62aRsPcJR4QKU RwA5A3iX/K494CPaWpX4 =OZz4 -----END PGP SIGNATURE----- --oLBj+sq0vYjzfsbl--