From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58780) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZenBc-0002Ab-Ug for qemu-devel@nongnu.org; Wed, 23 Sep 2015 12:46:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZenBY-0005UA-Io for qemu-devel@nongnu.org; Wed, 23 Sep 2015 12:46:28 -0400 References: <1442497700-2536-1-git-send-email-kwolf@redhat.com> <1442497700-2536-15-git-send-email-kwolf@redhat.com> From: Max Reitz Message-ID: <5602D755.6020501@redhat.com> Date: Wed, 23 Sep 2015 18:46:13 +0200 MIME-Version: 1.0 In-Reply-To: <1442497700-2536-15-git-send-email-kwolf@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="LoU5UtP7abvC0aIheVaGKqRmsrgxR7qkq" Subject: Re: [Qemu-devel] [PATCH 14/16] blockjob: Store device name at job creation List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf , qemu-block@nongnu.org Cc: jcody@redhat.com, berto@igalia.com, armbru@redhat.com, stefanha@redhat.com, qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --LoU5UtP7abvC0aIheVaGKqRmsrgxR7qkq Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: quoted-printable On 17.09.2015 15:48, Kevin Wolf wrote: > Some block jobs change the block device graph on completion. This means= > that the device that owns the job and originally was addressed with its= > device name may no longer be what the corresponding BlockBackend points= > to. >=20 > Previously, the effects of bdrv_swap() ensured that the job was (at > least partially) transferred to the target image. Events that contain > the device name could still use bdrv_get_device_name(job->bs) and get > the same result. >=20 > After removing bdrv_swap(), this won't work any more. Instead, save the= > device name at job creation and use that copy for the events. >=20 > Signed-off-by: Kevin Wolf > --- > blockjob.c | 8 +++++--- > include/block/blockjob.h | 8 ++++++++ > 2 files changed, 13 insertions(+), 3 deletions(-) Why not %s/bdrv_get_device_name(job->bs)/job->id/? Max --LoU5UtP7abvC0aIheVaGKqRmsrgxR7qkq 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 iQEcBAEBCAAGBQJWAtdWAAoJEDuxQgLoOKytNOMH/2SQGXrOpo3AgDjLEDk13bxQ irnvl0H1uEXMvzYQXU1AH0bSTG6yIVPm2rvlPmLo4czYEzGV64kK89fkQirXmgQu +2IltLoOtloZoNJOwDG2seku8lOaF/gT21dCduUbdyyCeTeQEVVr2sqIB2+dpoSd kKykxD9JHyHU21mkQ0o/65ukIbdl6aDBe8w30SsDDU3YZTTodGsRSTvSqJA73++w DbN6+ZTR4qV6tKzgu4meYrC5kf8aS5W0cTdAtiyFjDxabTjGMcnIJsFJ5ETcIMrz CTAIsewjEPR4GAPERgarh+hA4ySQCNhKKAw1mHd0282XFQlt6GP1VlXxJtRf0wc= =PO6W -----END PGP SIGNATURE----- --LoU5UtP7abvC0aIheVaGKqRmsrgxR7qkq--