Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp420414rwl; Thu, 23 Mar 2023 18:44:23 -0700 (PDT) X-Google-Smtp-Source: AKy350bFlPI5Mky6WJmRtEV4ka980GI0h4W6sE9qeWeyLwGsyD/SEAm+EE3SOShdjJTpeGx6m+A4 X-Received: by 2002:a17:906:3e4e:b0:886:7eae:26c4 with SMTP id t14-20020a1709063e4e00b008867eae26c4mr1031899eji.5.1679622263388; Thu, 23 Mar 2023 18:44:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679622263; cv=none; d=google.com; s=arc-20160816; b=Zr+haX0J7ri3QNcCMSQ7uoHxBcZHtDBkWgdTeqyiRFeAF/PQvcmrgnnT0d9JXauXtJ l+BDUAuhhrICBdg9yjDjkGLmAj1xQA19dnmGRYKyqAdNpiE5y6oT92M6UWy57KEVw0J1 16lz73bW02jUA7Ei/Ec66m/HGecYGK36Who7rhChuqMkZB9L4O4V1jeH+gUiqaeRWBkk NbUUGVRtCaHJ5e+E+yE4cmgxTfgqVAPzk3lGdf7fEVIThiqu/j0ZZvfYpN5BYdpbqZXh Wt/dF5KKhC5xixD2e0f4PiKK7kD/KWMyJXu0R7sWq8Lgwy9Be9XcEVkX/oHmoJLIpITA gcfA== 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 :mime-version:user-agent:date:message-id:from:cc:references:to :subject; bh=r+egBUFUxajMnwNIN3Z26iSBlg88QgKHctUu5P9Heeg=; b=zjqPe7G3IT/vE0c0DffBZX8jNJYwSmIZvUgJfoqPxk35j/7S1YsqdwO3jwu76cHnyx Mzz0sRTo1rZjrbNYjeZmCfOJhGe4+yKSkFMg7WdEo8wBHh8ieP9hk5HNQ/6DUgomysS7 6JyhsFt3XrGsJskxQpaXt1SocstwK5squhl+QgeDWGnuAYWTfbSosDOxOCtwlKF48Csp 4VJWq+d7enMDl1krhe7tpchNJzl+w3yblpvfxmJh5C8kGviTLLBJU3KXMI6Y5gs6SRQs LmOItb3LV5oG38vAgVXoaSQ8oZpCXagtlayeVaMcSmZYWTbeFb2KOVWWnwTDyiHKGZBD K0Fw== 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id pg13-20020a170907204d00b00933484aaf65si12731843ejb.510.2023.03.23.18.43.59; Thu, 23 Mar 2023 18:44:23 -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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229868AbjCXBlx (ORCPT + 99 others); Thu, 23 Mar 2023 21:41:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58120 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229499AbjCXBlv (ORCPT ); Thu, 23 Mar 2023 21:41:51 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D7C8D40C0; Thu, 23 Mar 2023 18:41:50 -0700 (PDT) Received: from canpemm500010.china.huawei.com (unknown [172.30.72.57]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4PjPyV3RdwzKrWD; Fri, 24 Mar 2023 09:39:30 +0800 (CST) Received: from [10.174.178.185] (10.174.178.185) by canpemm500010.china.huawei.com (7.192.105.118) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Fri, 24 Mar 2023 09:41:48 +0800 Subject: Re: [PATCH] scsi: fix hung_task when change host from recovery to running via sysfs To: Mike Christie , Benjamin Block , Ye Bin References: <20230321084204.1860900-1-yebin@huaweicloud.com> <20230321142237.GC311313@t480-pf1aa2c2.fritz.box> <641A58D0.1020205@huawei.com> <1df01cd0-e56e-b615-9418-e3fd69819798@oracle.com> CC: , , , From: "yebin (H)" Message-ID: <641CFFDC.2040201@huawei.com> Date: Fri, 24 Mar 2023 09:41:48 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: <1df01cd0-e56e-b615-9418-e3fd69819798@oracle.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.174.178.185] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To canpemm500010.china.huawei.com (7.192.105.118) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-2.3 required=5.0 tests=NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS 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 On 2023/3/24 0:12, Mike Christie wrote: > On 3/21/23 8:24 PM, yebin (H) wrote: >> >> On 2023/3/21 22:22, Benjamin Block wrote: >>> On Tue, Mar 21, 2023 at 04:42:04PM +0800, Ye Bin wrote: >>>> From: Ye Bin >>>> >>>> When do follow test: >>>> Step1: echo "recovery" > /sys/class/scsi_host/host0/state >>> Hmm, that make me wonder, what potential use-case this is for? Just >>> testing? >> Thank you for your reply. >> Actually, I'm looking for a way to temporarily stop sending IO to the driver. > Is this just for testing something or does a user/app need this > functionality for something? This can be used to store IO in the block layer, enabling some fault recovery that is insensitive to the upper layer.Also want to use this state to test the block layer. > We used to be able to block specific devices but we removed that. > It was useful for people like us where we need to do some low kernel > testing like testing for how upper layers handle IO hangs, but I > think it was not useful for other users so it was removed. > > . >