Received: from eggs.gnu.org ([2001:4830:134:3::10]:50085) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1agFns-0001ha-RE for qemu-devel@nongnu.org; Wed, 16 Mar 2016 14:04:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1agFns-0006mA-2w for qemu-devel@nongnu.org; Wed, 16 Mar 2016 14:04:16 -0400 Date: Wed, 16 Mar 2016 18:04:08 +0000 From: Stefan Hajnoczi Message-ID: <20160316180408.GC2012@stefanha-x1.localdomain> References: <1455645388-32401-1-git-send-email-pbonzini@redhat.com> <1455645388-32401-10-git-send-email-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="qtZFehHsKgwS5rPz" Content-Disposition: inline In-Reply-To: <1455645388-32401-10-git-send-email-pbonzini@redhat.com> Subject: Re: [Qemu-devel] [PATCH 09/16] block: wait for all pending I/O when doing synchronous requests List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: qemu-devel@nongnu.org, qemu-block@nongnu.org --qtZFehHsKgwS5rPz Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Feb 16, 2016 at 06:56:21PM +0100, Paolo Bonzini wrote: > Synchronous I/O should in general happen either in the main thread (e.g. > for bdrv_open and bdrv_create) or between bdrv_drained_begin and > bdrv_drained_end. Therefore, the simplest way to wait for it to finish > is to wait for _all_ pending I/O to complete. This seems okay although it opens the door to performance degradation due to waiting for all requests instead of one specific request. That shouldn't be a problem since synchronous code paths are usually not intended to have parallel I/O going on at the same time. --qtZFehHsKgwS5rPz Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJW6aAYAAoJEJykq7OBq3PIUMoH/RYf15hvE/6mTWlYsmfpfxwP XQzeAB5Kosp900+6qbDIbBnvkzHTihTBUUA3b412KY+49VucEeGfY5Mosu7PuhOU c3cwIw89TWBjR6k8csp6b+jsHLby+JAThnYnv/fC5o/wwus8+Un5MiqJcrUeBR24 ivwY+bkLKqOqRd6LIiBSPLZysvT33EPzK5ej4DhYl0pUB7Rt0o1eW0TKP5Wa09QO uHiMVZvWwXfaNbmjL0NskOMBcD61+4IkRFYTA53XZHZ0hD+Qpc3P6/NgGRtDrlvU HxQroxJmENqFFMBKluj7JPMFsfgijfOHyjFWI09EdLsCmprBgzZ/o1CZOR0q4bk= =Ci3V -----END PGP SIGNATURE----- --qtZFehHsKgwS5rPz--