Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp3471063rwl; Mon, 27 Mar 2023 14:47:13 -0700 (PDT) X-Google-Smtp-Source: AKy350YhbRs2ieW4qJTh4VlXLu01BgpeRqpxgfes3qIyOCwTn1WQ3Ru4HwjteU+GFQJ6xX253uAZ X-Received: by 2002:a17:906:70c9:b0:91d:a049:17a9 with SMTP id g9-20020a17090670c900b0091da04917a9mr13297659ejk.36.1679953633476; Mon, 27 Mar 2023 14:47:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679953633; cv=none; d=google.com; s=arc-20160816; b=zK1t6KVMA9rdVDbLtlHwbLPrTPxHkfVJ+o+7Z7A5aEArQZatsmgY5z0UpqTXbvF+OK Mg0gynqZ/EF486Gkabt05S5FjS1QwHLuOnEkNOFP6OMEJ2pQoXp2amQzILAtmDWqirtc t/68pVqTQklfXoa6XgAolJAKv+wZeMfEMjvqZeEJLF+mS0hfig4H7s3BTs5Jnh8JJMXv A8j/WWaNoQcyqHe73H+vPrqXHnDcx20FJGA0d1DmlEtMlOUsWHnOyfTq8/9IAhskX9aL ww9qWqr6lr5K4zUUxf/qG+0zFTvV0TKbqhrzgQKbuxhEbfflT9LLScaE58auQIj/F3yw g5kQ== 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:user-agent:mime-version :date:message-id; bh=mrhWOpnYqOzbSswTvxc2QdosIlWb0agRKLIOOTrkfmw=; b=sEzcD4E4CzxqDpS8Bq5lddTEZT5K5lK/QoY5MTq/ghGLa2uUQItyX2FAtyok5vI/xF wSBcEp4Lsjrqq6PB//DYgUkC+dOrAAPfI0O49mh9mMl06+TPqeKmL24QsGs7ra2Zv+nC F2DJsh9tRM0oAhVaiLMA/bTYhfWJuS0UjCevK6xh4PXGWz5xLfa2FhEB5lE75azGPcmD TD6FmShwq1f7wVRoPXp7JXupwcs1NuU+5QcAQaOhMnNy1GRoDzXhG3rjJ8VRXUcwiAx1 swZD/wIJyOdmCyOGAf/XNrHebiVZsE0dG6J5BzY6bRb5v2O2V02E/Vek5vKUwV2jgTZG LVtg== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=acm.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k23-20020a17090627d700b0093b4716633csi15071473ejc.139.2023.03.27.14.46.49; Mon, 27 Mar 2023 14:47:13 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=acm.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230208AbjC0Vh4 (ORCPT + 99 others); Mon, 27 Mar 2023 17:37:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53754 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230073AbjC0Vhy (ORCPT ); Mon, 27 Mar 2023 17:37:54 -0400 Received: from mail-pj1-f49.google.com (mail-pj1-f49.google.com [209.85.216.49]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A23E62D5B; Mon, 27 Mar 2023 14:37:50 -0700 (PDT) Received: by mail-pj1-f49.google.com with SMTP id p13-20020a17090a284d00b0023d2e945aebso270860pjf.0; Mon, 27 Mar 2023 14:37:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679953070; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=mrhWOpnYqOzbSswTvxc2QdosIlWb0agRKLIOOTrkfmw=; b=NTpM3ChtkHyuG4llVTzSaFjxxopKvXXOUTh6CFFOtYdw9xAqR7UaYLaY6QWiDEeC4h X1iwVLN1uvaEmCOwiuzstp47zpdLZSKvEn/lUNfVp37db/U2K7KXujjB2OQVJD0hIR9s 8g3WPkcdiNjuAfzAlsvE63Xrotc48XQsBEWKuRyKqMnMkQM6jnCm05rsZPX45D8ioAAS ZSB+s6NTI4tZYGIH79qSCDfJrd5QMNV6UgvGaziKS1k9PC57zvRMG4Agg+WMWmYkKN4Z LCokE/hf3bkIa+uOmQx5LL2oKneRg6gRtukbhdv+/Y8FF5Fd94ZIFtKGCLNJToK6Z3V8 lFuQ== X-Gm-Message-State: AAQBX9dVVDBzT2nbrM/CJK0UFRvLGbjAN2G4FI5UwcixlDkl6qvP14T0 id2NJQ55BX0/jApTWcRTPtA= X-Received: by 2002:a17:90b:38cc:b0:23d:35c9:bf1c with SMTP id nn12-20020a17090b38cc00b0023d35c9bf1cmr14094005pjb.16.1679953070097; Mon, 27 Mar 2023 14:37:50 -0700 (PDT) Received: from ?IPV6:2620:15c:211:201:798e:a3a0:ddc2:c946? ([2620:15c:211:201:798e:a3a0:ddc2:c946]) by smtp.gmail.com with ESMTPSA id t20-20020a1709028c9400b001a04b92ddffsm19609145plo.140.2023.03.27.14.37.49 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 27 Mar 2023 14:37:49 -0700 (PDT) Message-ID: <032dfbdc-bf8d-4ecc-dde3-162162be77ac@acm.org> Date: Mon, 27 Mar 2023 14:37:48 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1 Subject: Re: [PATCH 4/5] scsi: blocking IO when host is blocked Content-Language: en-US To: Ye Bin , jejb@linux.ibm.com, martin.petersen@oracle.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Ye Bin References: <20230325011734.507453-1-yebin@huaweicloud.com> <20230325011734.507453-5-yebin@huaweicloud.com> From: Bart Van Assche In-Reply-To: <20230325011734.507453-5-yebin@huaweicloud.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=0.5 required=5.0 tests=FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.6 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 3/24/23 18:17, Ye Bin wrote: > + if (unlikely(scsi_host_blocked(shost))) > + goto out_dec_target_busy; I this check would be moved earlier then the atomic_inc() and atomic_dec() of scsi_target(sdev)->target_busy could be skipped. Thanks, Bart.