From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53062) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fyQ05-0006Qx-0q for qemu-devel@nongnu.org; Fri, 07 Sep 2018 19:17:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fyPzz-0002I2-IO for qemu-devel@nongnu.org; Fri, 07 Sep 2018 19:17:16 -0400 References: <20180906130225.5118-1-jsnow@redhat.com> <20180906130225.5118-7-jsnow@redhat.com> <20180906165720.GD22117@localhost.localdomain> From: Max Reitz Message-ID: Date: Sat, 8 Sep 2018 01:16:56 +0200 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="PI3p28YYB4sQ8ZTiJeZEbAKDRqDMOVzWl" Subject: Re: [Qemu-devel] [PATCH v5 06/16] block/mirror: conservative mirror_exit refactor List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: John Snow , Jeff Cody Cc: Kevin Wolf , qemu-block@nongnu.org, Markus Armbruster , "Dr. David Alan Gilbert" , qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --PI3p28YYB4sQ8ZTiJeZEbAKDRqDMOVzWl From: Max Reitz To: John Snow , Jeff Cody Cc: Kevin Wolf , qemu-block@nongnu.org, Markus Armbruster , "Dr. David Alan Gilbert" , qemu-devel@nongnu.org Message-ID: Subject: Re: [Qemu-devel] [PATCH v5 06/16] block/mirror: conservative mirror_exit refactor References: <20180906130225.5118-1-jsnow@redhat.com> <20180906130225.5118-7-jsnow@redhat.com> <20180906165720.GD22117@localhost.localdomain> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2018-09-06 22:31, John Snow wrote: >=20 >=20 > On 09/06/2018 12:57 PM, Jeff Cody wrote: >> On Thu, Sep 06, 2018 at 09:02:15AM -0400, John Snow wrote: >>> For purposes of minimum code movement, refactor the mirror_exit >>> callback to use the post-finalization callbacks in a trivial way. >>> >>> Signed-off-by: John Snow >>> --- >>> block/mirror.c | 39 ++++++++++++++++++++++++++++----------- >>> 1 file changed, 28 insertions(+), 11 deletions(-) >>> >>> diff --git a/block/mirror.c b/block/mirror.c >>> index bd3e908710..a92b4702c5 100644 >>> --- a/block/mirror.c >>> +++ b/block/mirror.c >>> @@ -79,6 +79,7 @@ typedef struct MirrorBlockJob { >>> int max_iov; >>> bool initial_zeroing_ongoing; >>> int in_active_write_counter; >>> + bool prepared; >>> } MirrorBlockJob; >>> =20 >>> typedef struct MirrorBDSOpaque { >>> @@ -607,7 +608,7 @@ static void mirror_wait_for_all_io(MirrorBlockJob= *s) >>> } >>> } >>> =20 >>> -static void mirror_exit(Job *job) >=20 > /** > * mirror_exit_common: handle both abort() and prepare() cases. > * for .prepare, returns 0 on success and -errno on failure. > * for .abort cases, denoted by abort =3D true, MUST return 0. > */ Any case: Reviewed-by: Max Reitz --PI3p28YYB4sQ8ZTiJeZEbAKDRqDMOVzWl Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEkb62CjDbPohX0Rgp9AfbAGHVz0AFAluTBugACgkQ9AfbAGHV z0CEgQf/dlvineNOYx4JjUw3mYrmAD+qk2vIKJqIrIvehtSvx28TyGxpsPIwiW40 a8pgaSML7wxTxQkkq6fhanp7grJ1DKbY2kHa0oezHVX03+WP77jpUlYTe4UkmAFy zg1flze+1hIyCg1oFpkWL0VEqUO5op4nhb0o/i1maMDdtzIiBjtIOmfC8WwYk99W 4FmEWghFa7gJBNH8S16zxYyolzOGrapEYbqRl+iVZgBft584QUqfDEMu56BQChCK bz7t7YaZ5wsSINRHLQLJX/A+WQftawEM8TvP1yKfTz42PRJjLuwdOczAXg2QeFRY 9BIpky2meBxzzvOp8eeRU9xlXItffA== =2fXy -----END PGP SIGNATURE----- --PI3p28YYB4sQ8ZTiJeZEbAKDRqDMOVzWl--