Received: from eggs.gnu.org ([2001:4830:134:3::10]:34954) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZK4ff-0000CD-Ba for qemu-devel@nongnu.org; Tue, 28 Jul 2015 09:11:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZK4fb-0006Tt-G5 for qemu-devel@nongnu.org; Tue, 28 Jul 2015 09:11:51 -0400 Received: from e06smtp11.uk.ibm.com ([195.75.94.107]:33449) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZK4fb-0006Sb-07 for qemu-devel@nongnu.org; Tue, 28 Jul 2015 09:11:47 -0400 Received: from /spool/local by e06smtp11.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 28 Jul 2015 14:11:42 +0100 Received: from b06cxnps4075.portsmouth.uk.ibm.com (d06relay12.portsmouth.uk.ibm.com [9.149.109.197]) by d06dlp02.portsmouth.uk.ibm.com (Postfix) with ESMTP id 33F362190066 for ; Tue, 28 Jul 2015 14:11:14 +0100 (BST) Received: from d06av11.portsmouth.uk.ibm.com (d06av11.portsmouth.uk.ibm.com [9.149.37.252]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t6SDBcUB28049616 for ; Tue, 28 Jul 2015 13:11:38 GMT Received: from d06av11.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av11.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t6SDBbYH031361 for ; Tue, 28 Jul 2015 07:11:37 -0600 Date: Tue, 28 Jul 2015 15:11:36 +0200 From: Cornelia Huck Message-ID: <20150728151136.2061879b.cornelia.huck@de.ibm.com> In-Reply-To: <1438086628-13000-1-git-send-email-pbonzini@redhat.com> References: <1438086628-13000-1-git-send-email-pbonzini@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH for-2.4] block: delete bottom halves before the AioContext is freed List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: qemu-devel@nongnu.org, stefanha@redhat.com On Tue, 28 Jul 2015 14:30:28 +0200 Paolo Bonzini wrote: > diff --git a/async.c b/async.c > index 9ca7095..efce14b 100644 > --- a/async.c > +++ b/async.c > @@ -233,6 +233,7 @@ aio_ctx_finalize(GSource *source) > AioContext *ctx = (AioContext *) source; > > qemu_bh_delete(ctx->notify_dummy_bh); > + thread_pool_free(ctx->thread_pool); > > qemu_mutex_lock(&ctx->bh_lock); > while (ctx->first_bh) { > @@ -246,7 +247,6 @@ aio_ctx_finalize(GSource *source) > } > qemu_mutex_unlock(&ctx->bh_lock); > > - thread_pool_free(ctx->thread_pool); > aio_set_event_notifier(ctx, &ctx->notifier, NULL); > event_notifier_cleanup(&ctx->notifier); > rfifolock_destroy(&ctx->lock); > diff --git a/hw/block/dataplane/virtio-blk.c b/hw/block/dataplane/virtio-blk.c > index 3db139b..6106e46 100644 > --- a/hw/block/dataplane/virtio-blk.c > +++ b/hw/block/dataplane/virtio-blk.c > @@ -223,8 +223,8 @@ void virtio_blk_data_plane_destroy(VirtIOBlockDataPlane *s) > virtio_blk_data_plane_stop(s); > blk_op_unblock_all(s->conf->conf.blk, s->blocker); > error_free(s->blocker); > - object_unref(OBJECT(s->iothread)); > qemu_bh_delete(s->bh); > + object_unref(OBJECT(s->iothread)); > g_free(s); > } > With this applied on top of Stefan's AioContext patches, both managedsave and device_del with dataplane devices work for me. Tested-by: Cornelia Huck