Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp4069160rwl; Sun, 2 Apr 2023 22:18:11 -0700 (PDT) X-Google-Smtp-Source: AKy350bTRO0164/2caq7rGBhAyimoLoBX9gBmrtjqL6LgM4uKZ7o9uzLOUDkp8G+Jjie4n8KL6lr X-Received: by 2002:a05:6a20:4407:b0:e5:2d3d:4a49 with SMTP id ce7-20020a056a20440700b000e52d3d4a49mr5910441pzb.7.1680499091689; Sun, 02 Apr 2023 22:18:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680499091; cv=none; d=google.com; s=arc-20160816; b=KgI4wFKGdIFDgAew9XnXKwWZpDwktsyUcXtd4GNMohndaKpnxbcazPiyo3cnFdBrmR uV65ly4ozjWy6IcWYxYHrRb4kl5gPwTkEDAipF0Tw47kw430PVsgfU5pk1KfZSezNs2g DiY5jBoyRIUvQ/uBJ2/fpU1Ab9ioY0gNGlFa1TUBG0zXfYY6kK+xuFqx2uIl6mue3ilq LI8jwzIpcFfUlJyLhMKqxq9Sk6rcbgFrHp5YiBvhlakwLDT5rR6OIE8Veft7U92sB43h 4KOgg+S672QuXXgX/q5Kk7uezCI6qtbHzKyWcW6Iw5qPH4M/mzUOSTjuIa5yhMgCXcxJ 1VtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:reply-to:user-agent :mime-version:date:message-id; bh=iCdjgzunUSQZwCcp1nptiAyO/DIgVbyp57qVzXBjnlE=; b=VrSg/ZzcdN98GXu5NyqTp01o5X+b5SaQM9b0Ee+oFLZ58fLz+vqduH6uibRWaddlsa 4RyYjCy+75/i7umAuomfhhz5Z6au9rYPosXBE3qixzRcJOmD8DfkCfDCtGjUV0nx/M9S 6dgWsl3/wU4lRMINfoPiTEellcKVQb0u31T2TSBLQzeBPRUTKkOwcZgTtca+9Qw0eE9n xiWlVYDYUVB/2Rs7itEwG1HKwbaO8bBF/+RaETNo/+uasxfsAaq8kRCnPLYTcR7Wdv0S tY10X8oSIIe5DR9lB2qR4knENZS8PwlkB7NfODFPf9O4/67rRvDYQTtevqn8w1FHOheB k7bQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v70-20020a638949000000b0051343add56fsi7615607pgd.35.2023.04.02.22.17.59; Sun, 02 Apr 2023 22:18:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231205AbjDCFLT (ORCPT + 99 others); Mon, 3 Apr 2023 01:11:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52532 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229454AbjDCFLS (ORCPT ); Mon, 3 Apr 2023 01:11:18 -0400 Received: from mp-relay-01.fibernetics.ca (mp-relay-01.fibernetics.ca [208.85.217.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C80A17ED4; Sun, 2 Apr 2023 22:11:16 -0700 (PDT) Received: from mailpool-fe-02.fibernetics.ca (mailpool-fe-02.fibernetics.ca [208.85.217.145]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mp-relay-01.fibernetics.ca (Postfix) with ESMTPS id 3BAA7E1AB7; Mon, 3 Apr 2023 05:11:15 +0000 (UTC) Received: from localhost (mailpool-mx-02.fibernetics.ca [208.85.217.141]) by mailpool-fe-02.fibernetics.ca (Postfix) with ESMTP id 27CBE60A47; Mon, 3 Apr 2023 05:11:15 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at X-Spam-Score: -0.2 X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 Received: from mailpool-fe-02.fibernetics.ca ([208.85.217.145]) by localhost (mail-mx-02.fibernetics.ca [208.85.217.141]) (amavisd-new, port 10024) with ESMTP id BjYH-7oBjx1s; Mon, 3 Apr 2023 05:11:14 +0000 (UTC) Received: from [192.168.48.17] (host-184-164-23-94.dyn.295.ca [184.164.23.94]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: dgilbert@interlog.com) by mail.ca.inter.net (Postfix) with ESMTPSA id 53B51609E9; Mon, 3 Apr 2023 05:11:14 +0000 (UTC) Message-ID: Date: Mon, 3 Apr 2023 01:11:13 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.1 Reply-To: dgilbert@interlog.com Subject: Re: [PATCH v3 04/11] scsi: scsi_debug: Protect block_unblock_all_queues() with mutex Content-Language: en-CA To: John Garry , jejb@linux.ibm.com, martin.petersen@oracle.com Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, bvanassche@acm.org References: <20230327074310.1862889-1-john.g.garry@oracle.com> <20230327074310.1862889-5-john.g.garry@oracle.com> From: Douglas Gilbert In-Reply-To: <20230327074310.1862889-5-john.g.garry@oracle.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2023-03-27 03:43, John Garry wrote: > There is no reason that calls to block_unblock_all_queues() from different > context can't race with one another, so protect with the > sdebug_host_list_mutex. There's no need for a more fine-grained per shost > locking here (and we don't have a per-host lock anyway). > > Also simplify some touched code in sdebug_change_qdepth(). > > Signed-off-by: John Garry Acked-by: Douglas Gilbert Thanks.