From patchwork Thu Jul 23 06:32:18 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fam Zheng X-Patchwork-Id: 499216 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 111FF140D18 for ; Thu, 23 Jul 2015 16:36:36 +1000 (AEST) Received: from localhost ([::1]:39710 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZIA7O-0003O1-84 for incoming@patchwork.ozlabs.org; Thu, 23 Jul 2015 02:36:34 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49111) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZIA4E-000626-Fl for qemu-devel@nongnu.org; Thu, 23 Jul 2015 02:33:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZIA4D-0004xT-JL for qemu-devel@nongnu.org; Thu, 23 Jul 2015 02:33:18 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35106) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZIA49-0004wQ-0A; Thu, 23 Jul 2015 02:33:13 -0400 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id A3BBA8F2F2; Thu, 23 Jul 2015 06:33:12 +0000 (UTC) Received: from ad.nay.redhat.com. (dhcp-15-42.nay.redhat.com [10.66.15.42]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t6N6WKRH030082; Thu, 23 Jul 2015 02:33:08 -0400 From: Fam Zheng To: qemu-devel@nongnu.org Date: Thu, 23 Jul 2015 14:32:18 +0800 Message-Id: <1437633138-29188-12-git-send-email-famz@redhat.com> In-Reply-To: <1437633138-29188-1-git-send-email-famz@redhat.com> References: <1437633138-29188-1-git-send-email-famz@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: kwolf@redhat.com, pbonzini@redhat.com, stefanha@redhat.com, qemu-block@nongnu.org Subject: [Qemu-devel] [RFC PATCH 11/11] block: Only poll block layer fds in bdrv_aio_poll X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org So that external events are not processed in nested event loops. Signed-off-by: Fam Zheng --- block/io.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/block/io.c b/block/io.c index 5f5e575..c98fa92 100644 --- a/block/io.c +++ b/block/io.c @@ -2611,5 +2611,6 @@ void bdrv_flush_io_queue(BlockDriverState *bs) bool bdrv_aio_poll(AioContext *ctx, bool blocking) { - return aio_poll(ctx, blocking); + return aio_poll_clients(ctx, blocking, + AIO_CLIENT_PROTOCOL | AIO_CLIENT_CONTEXT); }