From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35161) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b5MVt-0000vh-Ga for qemu-devel@nongnu.org; Tue, 24 May 2016 20:17:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b5MVs-0002O1-DQ for qemu-devel@nongnu.org; Tue, 24 May 2016 20:17:29 -0400 References: <1464097654-12977-1-git-send-email-kwolf@redhat.com> <1464097654-12977-5-git-send-email-kwolf@redhat.com> From: Eric Blake Message-ID: <5744EF0F.5040008@redhat.com> Date: Tue, 24 May 2016 18:17:19 -0600 MIME-Version: 1.0 In-Reply-To: <1464097654-12977-5-git-send-email-kwolf@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="fQD1JpjelgvkW2Mi6Sw1H4bUIggkNX0nm" Subject: Re: [Qemu-devel] [PATCH v2 04/14] block: Convert block job core to BlockBackend List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf , qemu-block@nongnu.org Cc: berto@igalia.com, jcody@redhat.com, qemu-devel@nongnu.org, mreitz@redhat.com, jsnow@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --fQD1JpjelgvkW2Mi6Sw1H4bUIggkNX0nm Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 05/24/2016 07:47 AM, Kevin Wolf wrote: > This adds a new BlockBackend field to the BlockJob struct, which > coexists with the BlockDriverState while converting the individual jobs= =2E >=20 > When creating a block job, a new BlockBackend is created on top of the > given BlockDriverState, and it is destroyed when the BlockJob ends. The= > reference to the BDS is now held by the BlockBackend instead of calling= > bdrv_ref/unref manually. >=20 > We have to be careful when we use bdrv_replace_in_backing_chain() in > block jobs because this changes the BDS that job->blk points to. At the= > moment block jobs are too tightly coupled with their BDS, so that movin= g > a job to another BDS isn't easily possible; therefore, we need to just > manually undo this change afterwards. >=20 > Signed-off-by: Kevin Wolf > --- > block/mirror.c | 3 +++ > blockjob.c | 37 ++++++++++++++++++++----------------- > include/block/blockjob.h | 3 ++- > 3 files changed, 25 insertions(+), 18 deletions(-) >=20 Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --fQD1JpjelgvkW2Mi6Sw1H4bUIggkNX0nm 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 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJXRO8PAAoJEKeha0olJ0NqNGUIAIS1eIeKmiK4nROtbCfFRZ/V FcF9F/49plHyx8VkJCeMAN4Y+ZckDnDQPiKwtlzlAg8FTUMuAGsPSjoQAnPPAowT vOuLhrsWXwgib59skW5q9/9zqBWPzHCREftbNSK9nDrfgyYdGXPtzLzX7tfIYPVl 8Y8UWfJhj5hrR+ivTz5uHizjsjfk3igbCiG++oBC65+pH/sNFkh2FjF6+JUTvL00 drcyNGJ9ki2rlN4wyssLeWvEdQOTpxeoYzeCVhogOgP3CYcFAF8yXdAneBbA4VE3 nzV9zihZK6OWwrpKVY8DG+J9/CHBgXcN0lPLJ4Ew8b6pSbgkgklELJbY9uHMMDk= =ygv9 -----END PGP SIGNATURE----- --fQD1JpjelgvkW2Mi6Sw1H4bUIggkNX0nm--