Received: from eggs.gnu.org ([2001:4830:134:3::10]:54298) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bzPJ4-0000Eh-Pl for qemu-devel@nongnu.org; Wed, 26 Oct 2016 10:35:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bzPJ3-00008a-Pa for qemu-devel@nongnu.org; Wed, 26 Oct 2016 10:35:54 -0400 Date: Wed, 26 Oct 2016 16:35:43 +0200 From: Kevin Wolf Message-ID: <20161026143543.GO4758@noname.str.redhat.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [PATCH v12 01/19] block: Add bdrv_drain_all_{begin, end}() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alberto Garcia Cc: qemu-devel@nongnu.org, qemu-block@nongnu.org, Max Reitz , Eric Blake , Markus Armbruster , Paolo Bonzini Am 26.10.2016 um 12:29 hat Alberto Garcia geschrieben: > bdrv_drain_all() doesn't allow the caller to do anything after all > pending requests have been completed but before block jobs are > resumed. > > This patch splits bdrv_drain_all() into _begin() and _end() for that > purpose. It also adds aio_{disable,enable}_external() calls to disable > external clients in the meantime. > > An important restriction of this split is that no new block jobs or > BlockDriverStates can be created between the bdrv_drain_all_begin() > and bdrv_drain_all_end() calls. This is not a concern now because > we'll only be using this in bdrv_reopen_multiple(), but it must be > dealt with if we ever have other uses cases in the future. > > Signed-off-by: Alberto Garcia > Cc: Paolo Bonzini Reviewed-by: Kevin Wolf