From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54232) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XEeOW-0007U8-LX for qemu-devel@nongnu.org; Tue, 05 Aug 2014 09:03:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XEeOO-00082L-00 for qemu-devel@nongnu.org; Tue, 05 Aug 2014 09:03:12 -0400 Received: from mx1.redhat.com ([209.132.183.28]:7278) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XEeON-000827-Np for qemu-devel@nongnu.org; Tue, 05 Aug 2014 09:03:03 -0400 Message-ID: <53E0D604.9080008@redhat.com> Date: Tue, 05 Aug 2014 07:03:00 -0600 From: Eric Blake MIME-Version: 1.0 References: <1406936961-20356-1-git-send-email-mreitz@redhat.com> <1406936961-20356-2-git-send-email-mreitz@redhat.com> In-Reply-To: <1406936961-20356-2-git-send-email-mreitz@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="qEkLavqANoJnrjReUJiPQ6Sgld8rgbEXl" Subject: Re: [Qemu-devel] [PATCH v2 1/7] block: Add status callback to bdrv_amend_options() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Reitz , qemu-devel@nongnu.org Cc: Kevin Wolf , =?UTF-8?B?QmVub8OudCBDYW5ldA==?= , Stefan Hajnoczi This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --qEkLavqANoJnrjReUJiPQ6Sgld8rgbEXl Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 08/01/2014 05:49 PM, Max Reitz wrote: > Depending on the changed options and the image format, > bdrv_amend_options() may take a significant amount of time. In these > cases, a way to be informed about the operation's status is desirable. >=20 > Since the operation is rather complex and may fundamentally change the > image, implementing it as AIO or a couroutine does not seem feasible. O= n s/couroutine/coroutine/ > the other hand, implementing it as a block job would be significantly > more difficult than a simple callback and would not add benefits other > than progress report to the amending operation, because it should not > actually be run as a block job at all. >=20 > A callback may not be very pretty, but it's very easy to implement and > perfectly fits its purpose here. >=20 > Signed-off-by: Max Reitz > --- > block.c | 5 +++-- > block/qcow2.c | 3 ++- > include/block/block.h | 8 +++++++- > include/block/block_int.h | 3 ++- > qemu-img.c | 2 +- > 5 files changed, 15 insertions(+), 6 deletions(-) Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --qEkLavqANoJnrjReUJiPQ6Sgld8rgbEXl Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg iQEcBAEBCAAGBQJT4NYEAAoJEKeha0olJ0NqVboH/3wXO69SYMPMPpM3Q0T5uWv4 PjqvLEVsLKuDFKrYAaqR8OepCkoX73I1C9K1oD0dVef4xEDCm+RWEY30NhqcxBu4 JIcjtG4RNXuiDOaXI3V8GtYSTBmW8f+Nwc+zpztQpSL915prjTvC63cUpDH/Ne3k RvRnMQ0rYekhbQH9Maqhefm7uP9ThD7TThtENoOMUPmV85j4fG8i4Ts8tYesI5Qk o7//fp/SpuK3oYaliHnhRqS8R8oRlqVLy/aYUnMBqDs//B1ZK1iUn8MZZjWFy/lj jUuxrdc4+18SewF8qi8P337VjxUAtXSKxCE3yXhSoqK4koqaKrZ7l6RAwvYg3Ac= =AdF8 -----END PGP SIGNATURE----- --qEkLavqANoJnrjReUJiPQ6Sgld8rgbEXl--