Received: by 10.223.185.116 with SMTP id b49csp2482808wrg; Mon, 12 Feb 2018 10:14:48 -0800 (PST) X-Google-Smtp-Source: AH8x227dKY8bwO7mUk+ftkePdw5ZqLDsFfneOn1SjTdciJO4AKHl7Ze/m8mKPl/+lzjKyoOc5be5 X-Received: by 10.98.75.11 with SMTP id y11mr12321247pfa.169.1518459288697; Mon, 12 Feb 2018 10:14:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518459288; cv=none; d=google.com; s=arc-20160816; b=bgRvUqgrUFw7lyBJTaaf2rUwuoev5jMddo0JKM64X9LtzCM5JxZSwPzFH0D2YSejPL kDqNNx9IbI93UEuHxZy5QDJ61sR7ZwuB6L0jdtI4NnZovRsbLT2d4+1j6FPm8fT3+rXp p6Jc0pbY4boSi6Dyk2EUybhRLB2m91aDkzJVkcI2wkyox0asYa4U6SDZDcjx0sES5Tt5 lltJ4ZQKDNbs5brGD4Dvz+7Ih+NfpC5PuD54aHWRGO9Y0HACotVx6OoCAwQmp4+uAJAZ wUtlLgD0QFsYpsvEosKriNzvrJN7GeIeLgfpDvmFuC76LVm3bjhBruci7+vZI30EQ6rW KpEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=1iQIxw30iY0hQADt037UT3Q6ilAFJG9ijJdJXm2yZAA=; b=JxIRJicK05WLeSwpdFV0nvXtIhRNXwkkGZZe/SpUZoVR8SRms7dunrEB1P1OhwTgrh teQOVCBhVTIeI9BmRywTV2cQ0Q1fBOJrOk+MYFfcMwOfp9tyYi3RQMtvH5q08/wtQBh9 MUxyu83YkxqlNog40pK2aId33jw7yysL91AKeaK+6ZZD/W8lHn6/pwShXHN6tHyfnJ0I MVTnEV2nUaLX1OIJHmzOUzqbRawPHr351g5RQ4ApOYSz8+YPFSeKtg3d7eV/wExhuZdi q8H/iJ+6A8VFE9wQhETSzAAZPOrcM8lI+DNzKdxAzNzPp3mnoIL63230JiEdUJxjfhrG yQSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=JPL9e7ry; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u5-v6si189288plz.165.2018.02.12.10.14.34; Mon, 12 Feb 2018 10:14:48 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=JPL9e7ry; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753878AbeBLSN2 (ORCPT + 99 others); Mon, 12 Feb 2018 13:13:28 -0500 Received: from esa3.hgst.iphmx.com ([216.71.153.141]:57109 "EHLO esa3.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753334AbeBLSN0 (ORCPT ); Mon, 12 Feb 2018 13:13:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1518459207; x=1549995207; h=subject:to:cc:references:from:message-id:date: mime-version:in-reply-to:content-transfer-encoding; bh=x4j2WR8huhSNCEEkIqPFf5VpDfgGp0i3JsOtRMOxu50=; b=JPL9e7ryFp570/QcNrgyj6WixJRLHLHjmt5DcWQj+Oa6wgV1eHoq8Tp3 //dJsTtzCSaYmpxYSxF3cBGHjOFeMaoHPLyL9v+5ChF81ZQGlwbJGPPZc 0gHVrj+mz7ExSvYmAaC6xx3nela4T7AwpWN9U9EgCGOpa68yEm9fBoWB+ WjzaHHexOAZ82+mIeEv2/6XWhiKTNTOL9fo75ICas8Ot6lAux8m97G8+/ 21vKuLGeiB2Vunjr7Z2gnLPop3vGDCr7cqpXFArAR1ZhtDTlIhiv37T0z FAegSXGguB5Uz5HFDx8fadceixaVFw7cHzx5JVB+85GcjvbHQYBWxauWS g==; X-IronPort-AV: E=Sophos;i="5.46,503,1511798400"; d="scan'208";a="71751855" Received: from h199-255-45-15.hgst.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 13 Feb 2018 02:13:26 +0800 Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep02.wdc.com with ESMTP; 12 Feb 2018 10:07:35 -0800 Received: from thinkpad-bart.sdcorp.global.sandisk.com (HELO [10.11.171.236]) ([10.11.171.236]) by uls-op-cesaip01.wdc.com with ESMTP; 12 Feb 2018 10:13:26 -0800 Subject: Re: UFS writing request failure handling To: "Bean Huo (beanhuo)" , "linux-scsi@vger.kernel.org" Cc: "linux-kernel@vger.kernel.org" References: <2a98182c0eed4f0d9615982dc3733024@SIWEX5A.sing.micron.com> From: Bart Van Assche Message-ID: Date: Mon, 12 Feb 2018 10:13:26 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <2a98182c0eed4f0d9615982dc3733024@SIWEX5A.sing.micron.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/12/18 04:21, Bean Huo (beanhuo) wrote: > I am looking at UFS error handling, but I didn't notice re-issues > requests with UTP error to the host controller. According UFS host > spec, "host software either completes the request that had the error > and requests still outstanding with error to higher level software, > or re-issues these requests to the host controller". For the latest > Linux UFS driver, it belongs to former one? If I am wrong, please > correct me. Hello Bean, I'm afraid that reissuing a failed write forever could cause an infinite loop that makes e.g. user space processes unkillable or that could cause an orderly system shutdown to hang. I'm not sure that we want such behavior. If you want to learn more about how the SCSI core handles failed writes, please have a look at scsi_decide_disposition(). A possible approach to modify the error handling behavior is to stack a dm driver on top of the SCSI core that implements the desired behavior. Bart.