From patchwork Tue Mar 28 14:34:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ye Bin X-Patchwork-Id: 7343 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2274608vqo; Tue, 28 Mar 2023 07:46:15 -0700 (PDT) X-Google-Smtp-Source: AKy350bGoBAnraO3WFo28kEFca06LjvQLHF6P4F6LcnumDw7sDUlSKqbdDrMTAVk4LCAnrquEAdP X-Received: by 2002:a17:902:d506:b0:1a1:b172:5428 with SMTP id b6-20020a170902d50600b001a1b1725428mr20024747plg.18.1680014775349; Tue, 28 Mar 2023 07:46:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680014775; cv=none; d=google.com; s=arc-20160816; b=TFrgnM17dWblyYNMiNwsgsaAXu7Mah8I29TZAxLvTrLKh/fSZ0+qjAUCXjruI/HUEQ A6S24Dsw48MIrM3NJqUrBtJGzF5FAse9+/45tltr7WvL+y0dO1wLF1r0UOYAElSuwaH0 FiXso/jCCmy0KUSpoObf6y83bi4ef9H/H5eTp8rfbCHj0udkNLn1ZB3ok4HRxRCHBQos 6CpPXPMgRpXBJY8fvaV2g+TT4KtaDsjbxMJlaZ04rnyMslfgc0GS9uAZN8putypX2Hrh mfWbl91kivbcWZ9r+ED3g+va46XUnCYlts0mlWuv49PCfq/j1NWM6Gqsiedax+/+ABas aK4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=rCo2W6WYPoayFgtA3VCuWvANf9FDhjhk9NCjjKu3tsI=; b=fcd4S0AFK/AJjWAIWfpYoXWqBnCTswDb+QRCx443dO5ETPnmHlemKJOxjj7mGyA7xp gGcL4rq4GdSFpm6/JhbZs/laSgcoGp80KLsPRa1wQF7G8Xp9rAtHUPxLIj3QzRi8ZXyz DTIYmQaPMMKh0akfbyXFyvUf5fIhwesgpLb9u+k9+9udAlTqOUsOYyTxLXKuDnKCEORL sYsmVw+ZFu4/KLfld5F//Ig6DN2lcfd7m90XB2aH9FcX4j/4nBXYJDjkW+2qviS1Op9x 90yyBbbDFi3UUv8IJm0VX2Kdt3bL2O2Jhs96QXuuxeC2n7fcs2NLLdB+WN5ssHvIx0OV xMcA== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i2-20020a17090332c200b001a1a8d97914si17898352plr.437.2023.03.28.07.46.02; Tue, 28 Mar 2023 07:46:15 -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 S230368AbjC1OfN (ORCPT + 99 others); Tue, 28 Mar 2023 10:35:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50202 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232984AbjC1OfJ (ORCPT ); Tue, 28 Mar 2023 10:35:09 -0400 Received: from dggsgout11.his.huawei.com (dggsgout11.his.huawei.com [45.249.212.51]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DA47EC146; Tue, 28 Mar 2023 07:35:07 -0700 (PDT) Received: from mail02.huawei.com (unknown [172.30.67.169]) by dggsgout11.his.huawei.com (SkyGuard) with ESMTP id 4PmBzW43hYz4f3wYw; Tue, 28 Mar 2023 22:35:03 +0800 (CST) Received: from huaweicloud.com (unknown [10.175.127.227]) by APP3 (Coremail) with SMTP id _Ch0CgDn4R8X+yJkk4bgFg--.7384S4; Tue, 28 Mar 2023 22:35:04 +0800 (CST) From: Ye Bin To: jejb@linux.ibm.com, martin.petersen@oracle.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Ye Bin Subject: [PATCH v2 0/3] limit set the host state by sysfs Date: Tue, 28 Mar 2023 22:34:39 +0800 Message-Id: <20230328143442.2684167-1-yebin@huaweicloud.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 X-CM-TRANSID: _Ch0CgDn4R8X+yJkk4bgFg--.7384S4 X-Coremail-Antispam: 1UD129KBjvdXoWrJr1fXr1DZw45Gw4DJw1xGrg_yoWxWFcE9a 4vqas5Jr1rWFWkCa43GrW8Aas5Kr43Xr4F9F4YkrWF9rW7XF95Kw1vvrW3uFWUuFWxXw45 Aw1rXryxGr1xJjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUboAYFVCjjxCrM7AC8VAFwI0_Gr0_Xr1l1xkIjI8I6I8E6xAIw20E Y4v20xvaj40_Wr0E3s1l1IIY67AEw4v_Jr0_Jr4l8cAvFVAK0II2c7xJM28CjxkF64kEwV A0rcxSw2x7M28EF7xvwVC0I7IYx2IY67AKxVWDJVCq3wA2z4x0Y4vE2Ix0cI8IcVCY1x02 67AKxVW8Jr0_Cr1UM28EF7xvwVC2z280aVAFwI0_GcCE3s1l84ACjcxK6I8E87Iv6xkF7I 0E14v26rxl6s0DM2AIxVAIcxkEcVAq07x20xvEncxIr21l5I8CrVACY4xI64kE6c02F40E x7xfMcIj6xIIjxv20xvE14v26r106r15McIj6I8E87Iv67AKxVWUJVW8JwAm72CE4IkC6x 0Yz7v_Jr0_Gr1lF7xvr2IYc2Ij64vIr41l42xK82IYc2Ij64vIr41l4I8I3I0E4IkC6x0Y z7v_Jr0_Gr1lx2IqxVAqx4xG67AKxVWUJVWUGwC20s026x8GjcxK67AKxVWUGVWUWwC2zV AF1VAY17CE14v26r126r1DMIIYrxkI7VAKI48JMIIF0xvE2Ix0cI8IcVAFwI0_Jr0_JF4l IxAIcVC0I7IYx2IY6xkF7I0E14v26r1j6r4UMIIF0xvE42xK8VAvwI8IcIk0rVWrJr0_WF yUJwCI42IY6I8E87Iv67AKxVWUJVW8JwCI42IY6I8E87Iv6xkF7I0E14v26r1j6r4UYxBI daVFxhVjvjDU0xZFpf9x07UQzVbUUUUU= X-CM-SenderInfo: p1hex046kxt4xhlfz01xgou0bp/ X-CFilter-Loop: Reflected X-Spam-Status: No, score=0.0 required=5.0 tests=SPF_HELO_NONE,SPF_NONE autolearn=unavailable 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761623173181310175?= X-GMAIL-MSGID: =?utf-8?q?1761623173181310175?= From: Ye Bin Diff v2 vs v1: 1. Remove set scsi host state by sysfs, as set host state by sysfs may lead to functional issue. Scsi host state has it's own running state machine. 2. Introduce 'blocked' sysfs api for set scsi host blocking IO. Use this function we can do some test. Ye Bin (3): scsi: forbid to set scsi host state by sysfs scsi: introduce 'blocked' sysfs api scsi: blocking IO when host is set blocked drivers/scsi/scsi_lib.c | 2 ++ drivers/scsi/scsi_sysfs.c | 58 ++++++++++++++++++++++----------------- include/scsi/scsi_host.h | 8 ++++++ 3 files changed, 43 insertions(+), 25 deletions(-)