From patchwork Tue Oct 13 10:16:15 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fam Zheng X-Patchwork-Id: 529666 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 ED78F1401F0 for ; Tue, 13 Oct 2015 21:16:31 +1100 (AEDT) Received: from localhost ([::1]:33487 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZlwdC-0001Oq-2c for incoming@patchwork.ozlabs.org; Tue, 13 Oct 2015 06:16:30 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60824) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zlwcm-00017G-Mk for qemu-devel@nongnu.org; Tue, 13 Oct 2015 06:16:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zlwcl-0006Qd-RS for qemu-devel@nongnu.org; Tue, 13 Oct 2015 06:16:04 -0400 Received: from mx1.redhat.com ([209.132.183.28]:39822) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zlwch-0006GO-LL; Tue, 13 Oct 2015 06:15:59 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (Postfix) with ESMTPS id 3CF18C0C9A81; Tue, 13 Oct 2015 10:15:59 +0000 (UTC) Received: from cpc-pc.redhat.com (vpn1-4-63.pek2.redhat.com [10.72.4.63]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t9DAFsIu027664; Tue, 13 Oct 2015 06:15:56 -0400 From: Fam Zheng To: qemu-devel@nongnu.org Date: Tue, 13 Oct 2015 18:16:15 +0800 Message-Id: <1444731375-14716-1-git-send-email-famz@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 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] [PATCH] Revert "blockdev: add note that block_job_cb() must be thread-safe" 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 This reverts commit 723c5d93c51bdb3adbc238ce90195c0864aa6cd5. block_job_cb is called by block_job_completed, which is always called in a main loop bottom half in existing block jobs. So we don't need to worry about thread-safety here. Signed-off-by: Fam Zheng --- blockdev.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/blockdev.c b/blockdev.c index 32b04b4..130b7fb 100644 --- a/blockdev.c +++ b/blockdev.c @@ -2248,11 +2248,6 @@ out: static void block_job_cb(void *opaque, int ret) { - /* Note that this function may be executed from another AioContext besides - * the QEMU main loop. If you need to access anything that assumes the - * QEMU global mutex, use a BH or introduce a mutex. - */ - BlockDriverState *bs = opaque; const char *msg = NULL;