From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41151) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g0YZq-00057W-VI for qemu-devel@nongnu.org; Thu, 13 Sep 2018 16:51:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g0YZq-00036D-64 for qemu-devel@nongnu.org; Thu, 13 Sep 2018 16:51:02 -0400 References: <20180913125217.23173-1-kwolf@redhat.com> <20180913125217.23173-12-kwolf@redhat.com> From: Max Reitz Message-ID: Date: Thu, 13 Sep 2018 22:50:27 +0200 MIME-Version: 1.0 In-Reply-To: <20180913125217.23173-12-kwolf@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="8ESbOVQrx8wjg10lYRqgpv9jeflCLrLF5" Subject: Re: [Qemu-devel] [PATCH v2 11/17] block-backend: Decrease in_flight only after callback List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf , qemu-block@nongnu.org Cc: famz@redhat.com, pbonzini@redhat.com, slp@redhat.com, jsnow@redhat.com, qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --8ESbOVQrx8wjg10lYRqgpv9jeflCLrLF5 From: Max Reitz To: Kevin Wolf , qemu-block@nongnu.org Cc: famz@redhat.com, pbonzini@redhat.com, slp@redhat.com, jsnow@redhat.com, qemu-devel@nongnu.org Message-ID: Subject: Re: [PATCH v2 11/17] block-backend: Decrease in_flight only after callback References: <20180913125217.23173-1-kwolf@redhat.com> <20180913125217.23173-12-kwolf@redhat.com> In-Reply-To: <20180913125217.23173-12-kwolf@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 13.09.18 14:52, Kevin Wolf wrote: > Request callbacks can do pretty much anything, including operations tha= t > will yield from the coroutine (such as draining the backend). In that > case, a decreased in_flight would be visible to other code and could > lead to a drain completing while the callback hasn't actually completed= > yet. >=20 > Signed-off-by: Kevin Wolf > Reviewed-by: Fam Zheng > --- > block/block-backend.c | 10 +++++++++- > 1 file changed, 9 insertions(+), 1 deletion(-) Reviewed-by: Max Reitz --8ESbOVQrx8wjg10lYRqgpv9jeflCLrLF5 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEkb62CjDbPohX0Rgp9AfbAGHVz0AFAluazZMACgkQ9AfbAGHV z0DfGQgAwYchWAboL+wgd9fkzVc+je9iHs2JqJIp2P+NVatfgs4eZDkCFNjWmTxV xDYCugssyP26De+6CldxWLM4hk3sbgwb2rAnrCaU7d4h3LzoPDOzHyznHGuZ1kRZ pw6nSt6z8RhtA37OW2rXHgCNhn4qw8W7dzcJ6VBXIbFxzgNLu869YBZMHvUUstre wuH94d9CmzzqOV1CyMaqS8OCNM6++SRnWSZF0X7tcJyn7IZwMASIbJWoOls6gBLC TWuZkE28WsoZwlb+oQKXckq8cmPdlSP2R665bmKefSJhfTmeszVst/nV/6BJwN9w A/f9ZIqB7yJy+Z+dJQmzsmQYIHyJjQ== =L8Vk -----END PGP SIGNATURE----- --8ESbOVQrx8wjg10lYRqgpv9jeflCLrLF5--