From patchwork Mon Nov 12 14:22:01 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 198394 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 2B2212C008A for ; Tue, 13 Nov 2012 01:22:46 +1100 (EST) Received: from localhost ([::1]:59687 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TXuuQ-0004Jr-N0 for incoming@patchwork.ozlabs.org; Mon, 12 Nov 2012 09:22:42 -0500 Received: from eggs.gnu.org ([208.118.235.92]:51106) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TXuuC-0004A3-Q2 for qemu-devel@nongnu.org; Mon, 12 Nov 2012 09:22:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TXuu9-0003mw-OG for qemu-devel@nongnu.org; Mon, 12 Nov 2012 09:22:28 -0500 Received: from mail-pb0-f45.google.com ([209.85.160.45]:34045) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TXuu9-0003mp-I2 for qemu-devel@nongnu.org; Mon, 12 Nov 2012 09:22:25 -0500 Received: by mail-pb0-f45.google.com with SMTP id mc8so1688260pbc.4 for ; Mon, 12 Nov 2012 06:22:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=6/U8m1tlh/BlXj6XMzXs7FWBimVlN0kujIRWWiEHSFM=; b=MnboucaQkNgnDgIiOhew6iD2GS6xVo37A136y5t2yjKcuCrb/mtOfE99t7fz3FGBA/ dPjwx+0/izQ9UOfbafHW8JbtVGsTGRwKjtuBRQxFjFWKIYmo829TT4cFwXk0QidW3XHd F4QVXTul+fJpry6yz7/RyFMHXXnXk4cu8WOw0Bog2zV5KH/Ksje1uV9lVM+3vqMwkV4y cdFcQHeVPfucCqkkRNmsCxRlBZVefqUnQ6d0R8Sx1DXVCEHMY8tNfSeTaefk7tRN8TwJ PZGVX9WigxMoAr8FuDbLYx9NgPy/riWtTOWLNJcsepxc7QY2hjaGCg+3ZMFkBsFDcsYl t8Yw== Received: by 10.68.243.70 with SMTP id ww6mr43776819pbc.108.1352730144887; Mon, 12 Nov 2012 06:22:24 -0800 (PST) Received: from yakj.usersys.redhat.com (93-34-169-1.ip50.fastwebnet.it. [93.34.169.1]) by mx.google.com with ESMTPS id vo8sm4271417pbc.16.2012.11.12.06.22.22 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 12 Nov 2012 06:22:23 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Mon, 12 Nov 2012 15:22:01 +0100 Message-Id: <1352730127-32685-2-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.7.12.1 In-Reply-To: <1352730127-32685-1-git-send-email-pbonzini@redhat.com> References: <1352730127-32685-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 209.85.160.45 Cc: aliguori@us.ibm.com Subject: [Qemu-devel] [PATCH 1/7] qemu-nbd: initialize main loop before block layer 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 qemu-nbd was broken because they initialized the block layer while qemu_aio_context was still NULL. Signed-off-by: Paolo Bonzini --- qemu-nbd.c | 2 +- 1 file modificato, 1 inserzione(+). 1 rimozione(-) diff --git a/qemu-nbd.c b/qemu-nbd.c index 15bcd08..80f08d8 100644 --- a/qemu-nbd.c +++ b/qemu-nbd.c @@ -539,6 +539,7 @@ int main(int argc, char **argv) snprintf(sockpath, 128, SOCKET_PATH, basename(device)); } + qemu_init_main_loop(); bdrv_init(); atexit(bdrv_close_all); @@ -584,7 +585,6 @@ int main(int argc, char **argv) memset(&client_thread, 0, sizeof(client_thread)); } - qemu_init_main_loop(); qemu_set_fd_handler2(fd, nbd_can_accept, nbd_accept, NULL, (void *)(uintptr_t)fd);