Received: from eggs.gnu.org ([2001:4830:134:3::10]:49801) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZB0PE-0005qs-5P for qemu-devel@nongnu.org; Fri, 03 Jul 2015 08:49:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZB0PB-00085X-Fy for qemu-devel@nongnu.org; Fri, 03 Jul 2015 08:49:24 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45957) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZB0PB-00085S-Bn for qemu-devel@nongnu.org; Fri, 03 Jul 2015 08:49:21 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (Postfix) with ESMTPS id C7379B8BBD for ; Fri, 3 Jul 2015 12:49:20 +0000 (UTC) From: Markus Armbruster References: <1435854281-6078-1-git-send-email-stefanha@redhat.com> Date: Fri, 03 Jul 2015 14:49:18 +0200 In-Reply-To: <1435854281-6078-1-git-send-email-stefanha@redhat.com> (Stefan Hajnoczi's message of "Thu, 2 Jul 2015 17:24:41 +0100") Message-ID: <87fv558kz5.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH] block: update bdrv_drain_all()/bdrv_drain() comments List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Paolo Bonzini , qemu-devel@nongnu.org Stefan Hajnoczi writes: > The doc comments for bdrv_drain_all() and bdrv_drain() are outdated: > > * The bdrv_drain() comment is a poor man's bdrv_lock()/bdrv_unlock() > which Fam Zheng is currently developing. Unfortunately this warning > was never really enough because devices keep submitting I/O and op > blockers don't prevent that. > > * The bdrv_drain_all() comment is still partially correct but reflects > the nature of the implementation rather than API documentation. > > Do make it clear that bdrv_drain() is only appropriate within an > AioContext. For anything spanning AioContexts you need > bdrv_drain_all(). > > Cc: Markus Armbruster > Cc: Paolo Bonzini > Signed-off-by: Stefan Hajnoczi For what it's worth (I'm not deep into our AIO): Reviewed-by: Markus Armbruster