From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34653) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ykaby-0000C0-NB for qemu-devel@nongnu.org; Tue, 21 Apr 2015 12:01:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ykabv-00045q-EO for qemu-devel@nongnu.org; Tue, 21 Apr 2015 12:01:22 -0400 Received: from mail-wi0-x234.google.com ([2a00:1450:400c:c05::234]:35217) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ykabv-00045k-6x for qemu-devel@nongnu.org; Tue, 21 Apr 2015 12:01:19 -0400 Received: by widdi4 with SMTP id di4so145059708wid.0 for ; Tue, 21 Apr 2015 09:01:18 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <553672D3.7080100@redhat.com> Date: Tue, 21 Apr 2015 17:54:59 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1424449612-18215-1-git-send-email-pbonzini@redhat.com> <551A7864.9030806@redhat.com> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH RFC 0/3] iothread: release iothread around aio_poll List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Fam Zheng , qemu-devel , Stefan Hajnoczi On 21/04/2015 17:40, Stefan Hajnoczi wrote: >> > >> > Stefan, can you put this on track for 2.4 or do you need a repost? > This series causes qemu-iotests -qcow2 091 to fail: > > 9f83aea22314d928bb272153ff37d2d7f5adbf06 is the first bad commit > commit 9f83aea22314d928bb272153ff37d2d7f5adbf06 > Author: Paolo Bonzini > Date: Fri Feb 20 17:26:50 2015 +0100 > > aio-posix: move pollfds to thread-local storage Oops... what I intended is this: diff --git a/aio-posix.c b/aio-posix.c index 4a30b77..e411591 100644 --- a/aio-posix.c +++ b/aio-posix.c @@ -254,8 +254,7 @@ bool aio_poll(AioContext *ctx, bool blocking) aio_set_dispatching(ctx, !blocking); ctx->walking_handlers++; - - npfd = 0; + assert(npfd == 0); /* fill pollfds */ QLIST_FOREACH(node, &ctx->aio_handlers, node) { @@ -276,6 +275,7 @@ bool aio_poll(AioContext *ctx, bool blocking) } } + npfd = 0; ctx->walking_handlers--; /* Run dispatch even if there were no readable fds to run timers */ but the above is totally untested, so feel free to just remove the assertion or also to drop the series. Paolo