Received: by 10.223.176.46 with SMTP id f43csp895480wra; Fri, 19 Jan 2018 03:51:04 -0800 (PST) X-Google-Smtp-Source: ACJfBotQmXbXVziTwcSGZjGyEZBWpTETzlX0AJiBmlUrWBW7VX7g+1i4NZaswYooAuxWQukH4J4/ X-Received: by 10.99.125.72 with SMTP id m8mr24628717pgn.146.1516362664424; Fri, 19 Jan 2018 03:51:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516362664; cv=none; d=google.com; s=arc-20160816; b=p+2l48X4cjFuPwCFBwbuvSNYsjY7lsSj3ZZ8lkcHvRTE3Y3B4kcj8AlG0u0X2kG6CY hY21TtkX9Dy1RhELJYdL2N2cHTpTqwFgB2LJ496jRS+81yN4ktU9pCLNEAr7uWDRcfft xOd575wApn8o43Bu1DSfChyn7wWx7VF1uzKY24V5zxFIwjeAvYr64larrtdKM2wL2MKZ zHiPn6k3xnsIB4D26iTI6J9f0+/08AieMMypsa/HSzUVwc2NEGlTugKyT3yV04/9UMqD eXFHIsv8er67sUn/MVvDxIJ1rT9Z7Y787sT6GfFz3V8AbBZHzraEEUOb/Igp+261DU5G OXaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=toXiXQfI8vZbl4UseOn/KPsihZkCKt8gdg11R3NmFY0=; b=ibTp3jlFEKiWdrdrj3/weN/jxGkiZWfe7ZOPFpgUY+3ty1Tzflsgq/J/pFA5mZn8u1 xluPMuIBr5UHRtn6kYNJUZlb6KRCcs6+LcnpEfpzKC77OVEpVyLRPq6jZv4yZdyiOz7k /OLZFvOV8hi31Tw/JNQNaZbX5N9F3yPK74krZC9Yh2RiJSAroMbsUdR8ZOCzNXtYYK1+ aoqpwg424J1ksYll0ZlvHYlvxCP1BZFkCrEfEUeVjkWtuvah4fRyCmQ/SEzIOJpPSMWQ UW2kmMgVQLn+uQ8tMqKWPnmCU6hqCLpco4f/xoY5e/peRDmP+9t3w+RLS6ObqvnCkAXK fNWQ== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j4si2303997pff.160.2018.01.19.03.50.50; Fri, 19 Jan 2018 03:51:04 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755581AbeASLtn (ORCPT + 99 others); Fri, 19 Jan 2018 06:49:43 -0500 Received: from mga05.intel.com ([192.55.52.43]:32789 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754892AbeASLtg (ORCPT ); Fri, 19 Jan 2018 06:49:36 -0500 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Jan 2018 03:49:36 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,381,1511856000"; d="scan'208";a="11629037" Received: from unknown (HELO localhost.localdomain) ([10.232.112.44]) by fmsmga008.fm.intel.com with ESMTP; 19 Jan 2018 03:49:35 -0800 Date: Fri, 19 Jan 2018 04:52:56 -0700 From: Keith Busch To: "jianchao.wang" Cc: axboe@fb.com, hch@lst.de, sagi@grimberg.me, maxg@mellanox.com, james.smart@broadcom.com, linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH V5 0/2] nvme-pci: fix the timeout case when reset is ongoing Message-ID: <20180119115255.GH12043@localhost.localdomain> References: <1516270202-8051-1-git-send-email-jianchao.w.wang@oracle.com> <20180119080130.GE12043@localhost.localdomain> <0639aa2f-d153-5aac-ce08-df0d4b45f9a0@oracle.com> <20180119084218.GF12043@localhost.localdomain> <84b4e3bc-fe23-607e-9d5e-bb5644eedb54@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <84b4e3bc-fe23-607e-9d5e-bb5644eedb54@oracle.com> User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 19, 2018 at 05:02:06PM +0800, jianchao.wang wrote: > We should not use blk_sync_queue here, the requeue_work and run_work will be canceled. > Just flush_work(&q->timeout_work) should be ok. I agree flushing timeout_work is sufficient. All the other work had already better not be running either, so it doesn't hurt to call the sync API. > In addition, we could check NVME_CC_ENABLE in nvme_dev_disable to avoid redundant invoking. > :) That should already be inferred through reading back the CSTS register.