From nobody Mon Feb 9 19:52:21 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1664186101; cv=none; d=zohomail.com; s=zohoarc; b=Kj+wMv4bMbhmSj0UKO3IL3jdjCLpRzymOMAAiAjH7yfOx1/UWTCArEyCmOteKS7vwP9e2S4fakDz5tuiAbQGyk1nCAJp+pZMg9kgrCjBEzMFTRGrkUdaSv68rutU/zVzUcw1TRrZJEBPar3+9ggDnJq6aU2DT3WLyHpCcWhX7p8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1664186101; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=LKqVznNy8akJg1iTy9Jd+SVAEogFydiIAa9+NwW7cgw=; b=MZ/aHO9BuhN8RVFQI9ci7p63IfhlrLZfn41acdG9J0HMt76FvPC3ZPq+pOO43uf4lBSQ9jmBgKJPxpdXgVXeLxxqkPT2guko/PLnbIrmEXVcEu0ju7R4nTpkRB8Mrn35k6CwKgNU/NCXG+f/+FeCw4P/ani+jnQOK5pEcK+uNGQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1664186101417644.9958800089044; Mon, 26 Sep 2022 02:55:01 -0700 (PDT) Received: from localhost ([::1]:47034 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ockpI-0002tg-6e for importer@patchew.org; Mon, 26 Sep 2022 05:55:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54482) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ockTh-0004tD-S5 for qemu-devel@nongnu.org; Mon, 26 Sep 2022 05:32:51 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:52675) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ockTV-0000JC-Rs for qemu-devel@nongnu.org; Mon, 26 Sep 2022 05:32:40 -0400 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-435-SdmIjoOANzW8LHc5FD_HtA-1; Mon, 26 Sep 2022 05:32:25 -0400 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 1EC00800B30; Mon, 26 Sep 2022 09:32:25 +0000 (UTC) Received: from virtlab701.virt.lab.eng.bos.redhat.com (virtlab701.virt.lab.eng.bos.redhat.com [10.19.152.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id BAE6149BB61; Mon, 26 Sep 2022 09:32:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1664184749; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=LKqVznNy8akJg1iTy9Jd+SVAEogFydiIAa9+NwW7cgw=; b=L3pNlQQ0+XMtRl23CYFfxz8W7xpkUUeoYLD4ilFx3SkoAVNPL71kW3VHSjIw66Hu7A45MM 6fxCFfBPpQ39JxDMA0EkAf5ijDHEqfZ1K35/nuGz2hmcREjPYKbnqd/BYm+72GVz3bnfQl eUv901tJPlyKUM8dJHOkO570GVomJ/Q= X-MC-Unique: SdmIjoOANzW8LHc5FD_HtA-1 From: Emanuele Giuseppe Esposito To: qemu-block@nongnu.org Cc: Kevin Wolf , Hanna Reitz , Paolo Bonzini , John Snow , Vladimir Sementsov-Ogievskiy , Wen Congyang , Xie Changlong , Markus Armbruster , Stefan Hajnoczi , Fam Zheng , qemu-devel@nongnu.org, Emanuele Giuseppe Esposito , Vladimir Sementsov-Ogievskiy Subject: [PATCH v12 19/21] block_job_query: remove atomic read Date: Mon, 26 Sep 2022 05:32:12 -0400 Message-Id: <20220926093214.506243-20-eesposit@redhat.com> In-Reply-To: <20220926093214.506243-1-eesposit@redhat.com> References: <20220926093214.506243-1-eesposit@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=eesposit@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -28 X-Spam_score: -2.9 X-Spam_bar: -- X-Spam_report: (-2.9 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1664186102266100001 Content-Type: text/plain; charset="utf-8" Not sure what the atomic here was supposed to do, since job.busy is protected by the job lock. Since the whole function is called under job_mutex, just remove the atomic. Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Stefan Hajnoczi Reviewed-by: Kevin Wolf --- blockjob.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blockjob.c b/blockjob.c index d04f804001..120c1b7ead 100644 --- a/blockjob.c +++ b/blockjob.c @@ -338,7 +338,7 @@ BlockJobInfo *block_job_query_locked(BlockJob *job, Err= or **errp) info =3D g_new0(BlockJobInfo, 1); info->type =3D g_strdup(job_type_str(&job->job)); info->device =3D g_strdup(job->job.id); - info->busy =3D qatomic_read(&job->job.busy); + info->busy =3D job->job.busy; info->paused =3D job->job.pause_count > 0; info->offset =3D progress_current; info->len =3D progress_total; --=20 2.31.1