Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp760213rdb; Thu, 30 Nov 2023 19:00:15 -0800 (PST) X-Google-Smtp-Source: AGHT+IEeFvhb9d3gTE+xlmpS3zC3mwlZzXUEqgCfrFmOXW6b0fp73u0KGPRiPS/lKQJYgBfLooRs X-Received: by 2002:a17:90b:38c2:b0:286:3d7e:5e7f with SMTP id nn2-20020a17090b38c200b002863d7e5e7fmr3352208pjb.18.1701399615646; Thu, 30 Nov 2023 19:00:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701399615; cv=none; d=google.com; s=arc-20160816; b=wYzrCgLosXkav2F/1X9d51txyDD4Oj02xeRxnlp/Xuy1ELtA/WchiyBDVqluIIstJ+ kTSI5aazjyMBd+Kqz7XDkA1oVgB/O6qSZhTACBHxjwbGHEDQFeeIKHzkiCovXvZnfDgy 9hUx4a8pdDovDr1JaczfPuDSc4kJ9eR2lV86wYfF0KPQx5DBlpvE/T9PPQuyHXS5VA2Y EqHs4jBxfBjgRcwwpPAvoEAQc+HA0LMNDlBENiaOlJt54h+rsjjz2Ma1ei3YZuPSUwlw kPBO1YeyFChKTsePtdAUB9W7vx9TtwAJNPOSkX/HtriMTJ06lNTJi0ROIaz1sO5yswQv vU8Q== 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:references :cc:to:from:content-language:subject:user-agent:mime-version:date :message-id; bh=ejF+jNBSrmu6lN6sXCl/RTBE3b/GvX2LDNs9TDwCZPQ=; fh=lLe8NoVVmEmysVgSqTZYlhODssQdAb0Zio5XUQnN4uk=; b=vLJajqwmctHkkL0VIdh7LGJxqVYDnI9GpEW7H+sqitCUWZb03aaCQwXnisi0Anca7D YkZii/tkMmBf7ua1xiMKSSlBcj/KQxFgL6vTHGj2Dl9UnV9oQ0GC93L+9VOXG6pJRbTW R4guTLynLZ1iedN9jZXJHPVeK3STN5Hu71AYQg70eFbb5U5PZ6ymdvS6K0fbFbJ+TfU1 7Hndu1cCqZkCw4R6clpsbvs5CrvBnFd5V2nNCjiKHV4l2XGQzmPactgN/uJdUnJlcFa+ J8kqt6BXc3hARe8AcCOpKwccW6y6B7L82YCV29eJ779suMnSj4ZnMq9Tp7USsmBueJwu gT9w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 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 morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id gv24-20020a17090b11d800b00285baead549si4820870pjb.157.2023.11.30.19.00.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Nov 2023 19:00:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 63E908040D58; Thu, 30 Nov 2023 19:00:07 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231537AbjLAC7y (ORCPT + 99 others); Thu, 30 Nov 2023 21:59:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51718 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229523AbjLAC7x (ORCPT ); Thu, 30 Nov 2023 21:59:53 -0500 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0F2121711; Thu, 30 Nov 2023 18:59:59 -0800 (PST) Received: from dggpemd100001.china.huawei.com (unknown [172.30.72.57]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4ShHp650blzWj2q; Fri, 1 Dec 2023 10:59:10 +0800 (CST) Received: from [10.67.120.108] (10.67.120.108) by dggpemd100001.china.huawei.com (7.185.36.94) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.2.1258.28; Fri, 1 Dec 2023 10:59:57 +0800 Message-ID: <2bc81cf1-5d94-c108-a107-a746daadb64d@huawei.com> Date: Fri, 1 Dec 2023 10:59:56 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.3.1 Subject: Re: [PATCH] scsi: libsas: Put the disk offline if all recovery actions fail Content-Language: en-CA From: yangxingui To: , , CC: , , , References: <20231130130118.14367-1-yangxingui@huawei.com> In-Reply-To: <20231130130118.14367-1-yangxingui@huawei.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.67.120.108] X-ClientProxiedBy: dggpemm100004.china.huawei.com (7.185.36.189) To dggpemd100001.china.huawei.com (7.185.36.94) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-2.9 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Thu, 30 Nov 2023 19:00:07 -0800 (PST) Sorry, please ignore this email, I need to update a new version, Thanks. On 2023/11/30 21:01, Xingui Yang wrote: > Currently, after all recovery actions in sas_eh_handle_sas_errors() fail > for sas disk, we just clear all IO, but the disk is still online. Perhaps > we should continue the subsequent recovery process for IO that cannot be > processed. If it still fails, the disk will be offline in > scsi_eh_ready_devs(). > > Signed-off-by: Xingui Yang > Signed-off-by: Bo Wu > --- > drivers/scsi/libsas/sas_scsi_host.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/scsi/libsas/sas_scsi_host.c b/drivers/scsi/libsas/sas_scsi_host.c > index 9047cfcd1072..3f9b99fa1769 100644 > --- a/drivers/scsi/libsas/sas_scsi_host.c > +++ b/drivers/scsi/libsas/sas_scsi_host.c > @@ -637,8 +637,8 @@ static void sas_eh_handle_sas_errors(struct Scsi_Host *shost, struct list_head * > SAS_ADDR(task->dev->sas_addr), > cmd->device->lun); > > - sas_eh_finish_cmd(cmd); > - goto clear_q; > + list_move_tail(&cmd->eh_entry, work_q); > + goto out; > } > } > out: >