Received: by 10.223.176.5 with SMTP id f5csp1081812wra; Wed, 7 Feb 2018 12:20:07 -0800 (PST) X-Google-Smtp-Source: AH8x224Myc9zUr51aCzgrkG8KHFZ+ouzF2sqR1yNyAEIt3gMCbtbcfXDApAyTC8AOHPgrgRB+/Ym X-Received: by 10.98.13.14 with SMTP id v14mr7083219pfi.184.1518034807002; Wed, 07 Feb 2018 12:20:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518034806; cv=none; d=google.com; s=arc-20160816; b=C3aBHdSVNH6qEOei6Mzsdel8X1BQCp96uR43rIoofWdWxvymNMERa2/2htHzw2LUQ2 36DsljV9K7KViYQUD4PTzcWXWmBUAVPZJy+8plldWM0Bc3bmC0k5W16nKUheIl6ITQIg FJApPCuQNX7aRdkRrbp7jTkO2eyyqZz5pTfbN7jBfx+thwBrV2qRFfxuCik9nkBH9LeN VefJs5GAPr4z3NkUN8cgXSnWtTPmrQj8V+IUPqR5CYxYxhg1/vjVoqjOnkl2SX+RV+Dv FJHYeI8uszckev8KUK6AiViLYRHejcOIhfLsxnWjfE7W24uXoQO6ZSn7IquUoDLUmyia Gc9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:user-agent:references :in-reply-to:subject:cc:to:from:date:content-transfer-encoding :mime-version:arc-authentication-results; bh=SfdRLq5gAchcXqy6hKbx5RZ20UWo7t7048BtVvBMXwU=; b=UEOOKpDS+0N3wnu6xnrTyri0qk0PAisgNYd+XERy96OmkitiZbUCeFjNQCJv4lMeBI Cdc1Wb4uSrIdC1AMa4Qxwho3KH+7ZYqT0dLhfdq7zadCvCixEzxGjCTWl5X5XiXQ1KvM rucI5Uto0bZjySG7W/iXCpE3wTPBLEHOXRgtjXp+8GfHPwicJZ3slO2wErBnE4tb/NJR JG/oEfkkchT/hlxeiWF6zWQKgdHYrOMAmi/SuKcsAX/GrIuhTskuHDGXatoO89XnVJij 3gdFKjyQUTT52z9tJpaJUO1E01vhiJ6fts8SZyumxDIdI24v20zmvtkzGuKjFk5t/O7l D2SQ== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o12-v6si1599520plk.60.2018.02.07.12.19.52; Wed, 07 Feb 2018 12:20:06 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754446AbeBGUSh (ORCPT + 99 others); Wed, 7 Feb 2018 15:18:37 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:37804 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754002AbeBGUSg (ORCPT ); Wed, 7 Feb 2018 15:18:36 -0500 Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w17KIJ37055135 for ; Wed, 7 Feb 2018 15:18:36 -0500 Received: from e37.co.us.ibm.com (e37.co.us.ibm.com [32.97.110.158]) by mx0a-001b2d01.pphosted.com with ESMTP id 2g07uhs8y5-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Wed, 07 Feb 2018 15:18:35 -0500 Received: from localhost by e37.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 7 Feb 2018 13:18:35 -0700 Received: from b03cxnp08025.gho.boulder.ibm.com (9.17.130.17) by e37.co.us.ibm.com (192.168.1.137) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 7 Feb 2018 13:18:32 -0700 Received: from b03ledav003.gho.boulder.ibm.com (b03ledav003.gho.boulder.ibm.com [9.17.130.234]) by b03cxnp08025.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w17KIVtF10486036; Wed, 7 Feb 2018 13:18:31 -0700 Received: from b03ledav003.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6F5596A042; Wed, 7 Feb 2018 13:18:31 -0700 (MST) Received: from ltc.linux.ibm.com (unknown [9.16.170.189]) by b03ledav003.gho.boulder.ibm.com (Postfix) with ESMTP id 710D86A03B; Wed, 7 Feb 2018 13:18:30 -0700 (MST) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Wed, 07 Feb 2018 14:19:54 -0600 From: wenxiong To: Ming Lei Cc: axboe@fb.com, linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org, Keith Busch , wenxiong@vmlinux.vnet.ibm.com, wenxiong@us.ibm.com Subject: Re: [PATCH]nvme-pci: Fixes EEH failure on ppc In-Reply-To: <20180207012353.GD13470@ming.t460p> References: <1517867380-18790-1-git-send-email-wenxiong@vmlinux.vnet.ibm.com> <20180206163347.GG31110@localhost.localdomain> <787e4960b62a03b3888c67e73d7e1ee2@linux.vnet.ibm.com> <20180207012353.GD13470@ming.t460p> X-Sender: wenxiong@linux.vnet.ibm.com User-Agent: Roundcube Webmail/1.0.1 X-TM-AS-GCONF: 00 x-cbid: 18020720-0024-0000-0000-000017E75452 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00008492; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000249; SDB=6.00986386; UDB=6.00500582; IPR=6.00765751; BA=6.00005819; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00019428; XFM=3.00000015; UTC=2018-02-07 20:18:33 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18020720-0025-0000-0000-00004E9FAD36 Message-Id: <5974b41335751a6bc59d5c823fb98202@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2018-02-07_06:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1802070256 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2018-02-06 19:24, Ming Lei wrote: > On Tue, Feb 06, 2018 at 02:01:05PM -0600, wenxiong wrote: >> On 2018-02-06 10:33, Keith Busch wrote: >> > On Mon, Feb 05, 2018 at 03:49:40PM -0600, wenxiong@vmlinux.vnet.ibm.com >> > wrote: >> > > @@ -1189,6 +1183,12 @@ static enum blk_eh_timer_return >> > > nvme_timeout(struct request *req, bool reserved) >> > > struct nvme_command cmd; >> > > u32 csts = readl(dev->bar + NVME_REG_CSTS); >> > > >> > > + /* If PCI error recovery process is happening, we cannot reset or >> > > + * the recovery mechanism will surely fail. >> > > + */ >> > > + if (pci_channel_offline(to_pci_dev(dev->dev))) >> > > + return BLK_EH_HANDLED; >> > > + >> > >> > This patch will tell the block layer to complete the request and >> > consider >> > it a success, but it doesn't look like the command actually completed at >> > all. You're going to get data corruption this way, right? Is returning >> > BLK_EH_HANDLED immediately really the right thing to do here? >> >> Hi Ming, >> >> Can you help checking if it is ok if returning BLK_EH_HANDLEDED in >> this >> case? > > Hi Wenxiong, > > Looks Keith is correct, and this timed out request will be completed by > block layer and NVMe driver if BLK_EH_HANDLED is returned, but this IO > isn't completed actually, so either data loss(write) or read failure is > caused. > > Maybe BLK_EH_RESET_TIMER is fine under this situation. > > Thanks, > Ming > Hi Ming, Thanks! I have tried with BLK_EH_RESET_TIMER and EEH recovery works fine. I am going to resubmit the patch. Thanks, Wendy