Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp7825577rwl; Thu, 23 Mar 2023 09:06:22 -0700 (PDT) X-Google-Smtp-Source: AKy350YoY9GNXy61ZkV/VjKRUVP9jWsGsGBAAm85y0IHy3JhSoBE7nCbx6Zke8sqcm0DnVRXSUwt X-Received: by 2002:a17:902:e882:b0:1a1:f413:70b1 with SMTP id w2-20020a170902e88200b001a1f41370b1mr7340521plg.18.1679587581843; Thu, 23 Mar 2023 09:06:21 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1679587581; cv=pass; d=google.com; s=arc-20160816; b=GGE/uBOKVEZsSiby2QRgyzlAQ5icTv5i6MpNddP29gQquMGzAM1THmVpSexYScjrT/ chlqF6ZdL1sqaa7Og1txGTC2JsOQOLtD5RypvQfZFQHzHiHdqwRjDLs4nocx0S1+AzAD gqtSCGTvYNpCNBkUo0Fq9MIPUEAuAET/nvK6x4wcAP1dadn4y7aPPnyLaQU6uukM8bIB CC0oDMG8WY++8sdFszZpPrahDQwQuzHUMfkIGqRU4rrotD3xEl8jalhWw6VCrhOiL5hj Muz/Qs425dTPtexsBnsEi3wcFqP5FAi3N0AJahXYdycXxmxxnDxdHT9x/q5nNsKoFJIp 6gaw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:from:references:cc:to:content-language:subject :user-agent:date:message-id:dkim-signature:dkim-signature; bh=cLhi98D9rqQgfGDlTpOkMwRF1jXa+ecRWuC9fBaRgZQ=; b=JSJoldyQTjxFSV3Qpn2FPkgEeqyKa96wEDcCd3TZTuFf3k82QGtKvSmzm/nVTfRDXd /cWUjp2x0VLTJq8LJ+9IM0NXTUN8VU2vj+GBTC0CMRU7xTN33g3N/H9d9D4dzRkFd6QZ ZMWEf1icr6xGYaZFlYF5fwMIs9Ff7YkklGr5L/MSO0Em/8Dhy/9C6tIQspaq+tlqC8qo ePl24jajW6jS4Gz+huSmh/A+584VZO/Zi4MPQfmQCFtHYrzLSo33KNfIWrkIZVSGtdux h2m+RjEBk7ok+MigQr5sR+al74F383dH0DeqaeOwMwpioiBuISZMUqQi3B6N0F5HA44V EoPw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2022-7-12 header.b=dvfTxssD; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=qGsizd6i; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.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=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p9-20020a170902b08900b0019f3aa99e9asi12163508plr.49.2023.03.23.09.05.50; Thu, 23 Mar 2023 09:06:21 -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; dkim=pass header.i=@oracle.com header.s=corp-2022-7-12 header.b=dvfTxssD; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=qGsizd6i; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.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=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232215AbjCWP6U (ORCPT + 99 others); Thu, 23 Mar 2023 11:58:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43936 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231718AbjCWP6S (ORCPT ); Thu, 23 Mar 2023 11:58:18 -0400 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AA66DEC61; Thu, 23 Mar 2023 08:58:17 -0700 (PDT) Received: from pps.filterd (m0333521.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 32NCxZYB030136; Thu, 23 Mar 2023 15:57:59 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=message-id : date : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2022-7-12; bh=cLhi98D9rqQgfGDlTpOkMwRF1jXa+ecRWuC9fBaRgZQ=; b=dvfTxssDRrlKFUb9TzbDOnRtYV/bCg9fzKxteIHzce7faduIfDHN54gwhfvcZjIUb/yP 8pKqFAUQcHxDZovTHT78805l0Grw8FFtw6d5Bq6BdjQd1b6vbdl1onFJtJFJbgLubiXS NDlth0B8SpjqbW4ZFQYNaBcIy3Ci02UBj+NYcXh1l/Q8ii2QG2OsJ/yI0QuuN45KjE8I 9IaFa+yeEgbmrEnmk8hXP2Qy1kloi1f2OUq63T1QrYnK/jiA9zE8M9lbW0TEAyf2zWY3 GPJ/GhNXmxgE3g5KOR/rBFb9na3oibKFDtjCqwd2786dpZRx/vbezCoE5bTfMOk8Ensl ng== Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3pd47tv9f4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 23 Mar 2023 15:57:59 +0000 Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.5/8.17.1.5) with ESMTP id 32NFdVAI006142; Thu, 23 Mar 2023 15:57:58 GMT Received: from nam10-mw2-obe.outbound.protection.outlook.com (mail-mw2nam10lp2108.outbound.protection.outlook.com [104.47.55.108]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3pgskr8uu3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 23 Mar 2023 15:57:57 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aPWltwI6nuiryoBRVvZNP1YAWrRbBNaY9YvDgULkHqsS14PntcTQIfSfuz+DYoj6sUyJRajXjY9WHZssDlNa8tQ2cOCOLAFicVGksb+Ndy2NBcklHqK56xtBxbsBd8h87RBOnPLTjcR5tuuuklCzH87Dhul2plnxV+8S+90ga3X2HQltNX5NMFMA9iWZJQpFSd0dJM27o68O0ODaS+LmqZIDR2isUqCnoqaJTu/m/vuk+TnjJPazfg7s4ZfvfCj7lsOrz5FEs5ckNCzRP49DTh3exYf5P9DChCeu1M+Mrv8j26xiLhMTkpFRtfrwxciGwiEvNoNNuuDgNlgDkyMidw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=cLhi98D9rqQgfGDlTpOkMwRF1jXa+ecRWuC9fBaRgZQ=; b=EphsH0V5wtgmESkKwPdtJIsIqu0BSn34IXdsVyZlFQwMD0hSat6IwDAF+pGNKi2+/5gf3k+akEIDODgfkZADsrVcT0MMgXN1p2q1BXZgLsBONFAMcuWmGHm9zqmZO/Ll9bxQhVDQy7BYJ4mMCAcx2kmrpbR/MDu9hwvxAn183MvyYOtfe4EJqpGgK8Joc+AF+buhVe7YTnMvSflBYy9t2DB6c0IdFxCX553uhRzu8UojJBGmvLv1ysb82gGCJWji06YUT68Yca+GSccGWJanAnnQih+5aIhDASImQvaHM4G5xvGSH+jQOi/l3qRSfmoCZsaFOWHcCQkCOIJ02TYHKQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=cLhi98D9rqQgfGDlTpOkMwRF1jXa+ecRWuC9fBaRgZQ=; b=qGsizd6iHFubPcy6KlN23pVbHdQdUaBoAr0TWnVEnFBMIwl3n/Pc9IBV9sktZBgS7dSlY/UDIabJcJCj5lXNOVlTfqiBVdAu5Z8AvDZVN/vFf1j3FnFygPlAHxjeXH77CFpDKUkgysBxTAWVvXEBPnDaqSSz+042JBEtHSbXXxw= Received: from DM5PR10MB1466.namprd10.prod.outlook.com (2603:10b6:3:b::7) by PH7PR10MB6627.namprd10.prod.outlook.com (2603:10b6:510:20a::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.38; Thu, 23 Mar 2023 15:57:55 +0000 Received: from DM5PR10MB1466.namprd10.prod.outlook.com ([fe80::7dd7:8d22:104:8d64]) by DM5PR10MB1466.namprd10.prod.outlook.com ([fe80::7dd7:8d22:104:8d64%7]) with mapi id 15.20.6178.038; Thu, 23 Mar 2023 15:57:55 +0000 Message-ID: <2259bccc-b7dc-e5b8-1efd-1deaf4864ae4@oracle.com> Date: Thu, 23 Mar 2023 10:57:53 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Subject: Re: [PATCH] scsi: fix hung_task when change host from recovery to running via sysfs Content-Language: en-US To: Benjamin Block , "yebin (H)" Cc: Ye Bin , jejb@linux.ibm.com, martin.petersen@oracle.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org References: <20230321084204.1860900-1-yebin@huaweicloud.com> <20230321142237.GC311313@t480-pf1aa2c2.fritz.box> <641A58D0.1020205@huawei.com> <20230323102113.GA859586@t480-pf1aa2c2> From: Mike Christie In-Reply-To: <20230323102113.GA859586@t480-pf1aa2c2> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: DM6PR02CA0037.namprd02.prod.outlook.com (2603:10b6:5:177::14) To DM5PR10MB1466.namprd10.prod.outlook.com (2603:10b6:3:b::7) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM5PR10MB1466:EE_|PH7PR10MB6627:EE_ X-MS-Office365-Filtering-Correlation-Id: e2711a71-3db3-4343-f84b-08db2bb75d60 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: iHq5FsCjUNSy11hr0cCnXobbokuCveRMlpZ3n/P7IZ+Az4oH+Axt/az+ksEVYZMx1mbIn5AzT42jEqNNC5osz67w8X1AgLSWOlUldWr33AwfAB+j+XmYZtovb4eY2pXLC3vO1OdNSPDyP/ipol2/KwFA5Z4Livmc8FcnJt9CMPCkgikBHXEyeuD0uVnPogLl7dILjNL0xY7hKsrzam+j7OpLshLRSCwt5iNDWYiN3flQDuCV6G2vsWmTui8s3C7VmUI12odPBM+Ig52x5Lhsk0MqoMcBYsQQHL3OfIFfEHWpNZNeUvFA/WrzgjVgrsiu8y20DiQTH716Iagv8VK7b3UcYt2m+oQppJ9RQYGoZeUEeG2YnIsRmh3igE1ajbdrwP/eG4d3BRszWcHO21yAEK5pr7m4dS8ok5Ni5247P6/XNfaQNGZv06LtEbO11dgtFeFlOV493h9I8xS2qTy1CJ5Ql9+X98cpay8xALrlGc6BlVi9EBDDNm/pcSYAk1p5llj0vcUQVAEpFe9sh6HIJOEpNbzmyRZB5SbTB/SU5EnNYvBGkpKwQbkrI9+xYxQUrvyJyKYkWQ83r5vVwtHUfRGnvGAgx/X5Pk+pMZdbqkJYInaaKnZRHCi5tsG9Z1zENrdNopgTMNEzcStwaDGpvonJkgnsmmVs4za0c2V1M82DD1K+OWh/pe5xWblLp4ILOJ1zHVCmARFoQygWqkXbODMxZ/VZnL6LZWVQbnKMG14= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM5PR10MB1466.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230025)(39860400002)(366004)(136003)(376002)(396003)(346002)(451199018)(36756003)(8676002)(86362001)(4326008)(66946007)(66556008)(8936002)(66476007)(41300700001)(6486002)(316002)(478600001)(110136005)(5660300002)(2906002)(31696002)(26005)(38100700002)(53546011)(6512007)(6506007)(186003)(2616005)(83380400001)(31686004)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?MnpncEJxRGJDM0hLSlFnZnBWWWlWaVR3b2x5SmV3SE9WS1RnZUhSZ3RvMVZp?= =?utf-8?B?TEZkMW53elFONmFWZTk4a1RUYzB6U1BsbGpSOFFBdUZvRzkvWURIR2tBMlBK?= =?utf-8?B?eS9sZ2JmNVhnV3dsNm1pK0JmaTFkbHpWWHRUR2d0allhTlUrSk92eldwM3dC?= =?utf-8?B?VytaLysvS3hwdUZqai8xZXJWRWJ3RWtCcjh6NzdXaGpoMVB1SlBJaUtKamUw?= =?utf-8?B?dEQrajhOWlBMa3JuNXd6aU1qdTBNMTVqc2l6akFnLy83R2c4Mm0rbGdGUHJH?= =?utf-8?B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hTDd3MrrfwaYeA7vQM1teYGp X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: e2711a71-3db3-4343-f84b-08db2bb75d60 X-MS-Exchange-CrossTenant-AuthSource: DM5PR10MB1466.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Mar 2023 15:57:54.9952 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 5nzkRs6MxtxiUuFaSdreHnlES5hZlqPjTBtP9ML9Gl111moowMPzoAEy7WycLRA6Uz1+21igDBDpQMGXFBFLKf9doQFSHmT94iEifMWmE/A= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR10MB6627 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-03-22_21,2023-03-23_02,2023-02-09_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 adultscore=0 mlxlogscore=879 bulkscore=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2303150002 definitions=main-2303230116 X-Proofpoint-GUID: zzLoyY0DE-qXs44o8VrtP9edVfTNDCf9 X-Proofpoint-ORIG-GUID: zzLoyY0DE-qXs44o8VrtP9edVfTNDCf9 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,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 On 3/23/23 5:21 AM, Benjamin Block wrote: > On Wed, Mar 22, 2023 at 09:24:32AM +0800, 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. >> Setting the state of the host to recovery can do this, but I changed >> the state to running and found that the process could not be woken up. >> I don't know what the purpose of designing this sysfs interface was. >> But this modification can solve the effect I want to achieve. > > My first thought when seeing this was that maybe we should also limit > this interface to say `SHOST_RUNNING` and `SHOST_RECOVERY` (similar to > what is done in `store_state_field()`). > That would limit the amount of corner cases drastically. > > And in case of setting `SHOST_RUNNING` after the scsi host was set to > `SHOST_RECOVERY`, we could also make use of the already existing > function `scsi_restart_operations()` to handle the restart in the same > way as EH does. > I agree we should limit the states we can set. It doesn't make sense for userspace to be able to set states like SHOST_CANCEL and I think it would later break functions like scsi_remove_host. Maybe instead of allowing SHOST_RECOVERY to be used by userspace we want a new state SHOST_BLOCKED which just does the specific operation we want. If we re-use SHOST_RECOVERY for userspace blocking IO there could be issues later on because that state also means we are going to be performing the eh callouts and not just stopping IO. Or maybe instead of a different state we just add another shost field similar to tmf_in_progress which forces scsi_queue_rq to not queue IO to the drivers.