Received: from eggs.gnu.org ([2001:4830:134:3::10]:58938) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZBxHT-0003c3-EJ for qemu-devel@nongnu.org; Sun, 05 Jul 2015 23:41:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZBxHP-0003TN-F0 for qemu-devel@nongnu.org; Sun, 05 Jul 2015 23:41:19 -0400 Received: from mx1.redhat.com ([209.132.183.28]:48680) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZBxHP-0003Sp-AV for qemu-devel@nongnu.org; Sun, 05 Jul 2015 23:41:15 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (Postfix) with ESMTPS id 520482B785E for ; Mon, 6 Jul 2015 03:41:14 +0000 (UTC) Date: Mon, 6 Jul 2015 11:41:11 +0800 From: Fam Zheng Message-ID: <20150706034111.GB9051@ad.nay.redhat.com> References: <1435854281-6078-1-git-send-email-stefanha@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1435854281-6078-1-git-send-email-stefanha@redhat.com> 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, Markus Armbruster On Thu, 07/02 17:24, Stefan Hajnoczi wrote: > 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 Reviewed-by: Fam Zheng