Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp2799609imm; Thu, 24 May 2018 16:27:37 -0700 (PDT) X-Google-Smtp-Source: AB8JxZql3VwK3kC0un+VCWIbUdODtCqPqaAneOZSOAQFHPZYosfgN1BcTxg0mpdcfHBHBBRgwNOz X-Received: by 2002:a17:902:1c8:: with SMTP id b66-v6mr48688plb.156.1527204457718; Thu, 24 May 2018 16:27:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527204457; cv=none; d=google.com; s=arc-20160816; b=R3G8MOQPeosjEPjB6V+3w/a6GjRXZ9GjPnqJgl4UCyEA7b4ZBBEs7BmdVzyQA1UEyX sPvltaLgwBktGe20mOPYwicFoHeyw/MrCEhnIvqG+CeJoMqOcbABpzCbg4EFYqAqTzZ7 wBnafalhDY6BPNpkTwDeWT50tPF731jBURKx9FnifYRjfGsBJGvEwiXyA9G0bHGf/kp7 RO7SziiysJyFIi26EpxURXopSxZlRpIuZceE85EcPwVq4eAU9ARCRiYxUtFPAeNWrIGY 875CJ33MwxuvlNEToVyekV0tD/XPDueRzD0SU77Z88T1/66zna5/+2Gd+zHtWPgWbtO3 7Hzw== 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=Kc1CCwKJk7TwkILNfOBrUYuvDMxKfPB8qoeZCsu/8I8=; b=xCOjshqOMQ3LqCyT+sw8RXpGmknKgIY8Yt1hHDZcd6UEWtbkcbOSXJ14LebsOb3JZI CchDSw7lKFXJIMKKVBx2gnZnjtLK+gtAqC6R4yfR/y7DDmB2Y1iCYR688+P5eCMfpPxn OjpKlYP4bqku6owqAgCDY3nwZo2BRk4Am7sm/TZUHunh/tjtrE3aaeaK9O1k6/5QCWXb d+vXLNsChZUG34hhq0TxTObRrjdsj+WQClpacWFDC9K8iZXodCSAC38mDOOwfm+N+WBX NPGiz80jbjL/Fd4+oshNkAHTqj9Cdw3UFtXgFd5FEikj0oosN3lqCQPSKp3rcbdm/Ukh Rqrg== 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=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 205-v6si14241249pgf.604.2018.05.24.16.27.23; Thu, 24 May 2018 16:27:37 -0700 (PDT) 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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S969421AbeEXNgo (ORCPT + 99 others); Thu, 24 May 2018 09:36:44 -0400 Received: from mga05.intel.com ([192.55.52.43]:49072 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965823AbeEXNgn (ORCPT ); Thu, 24 May 2018 09:36:43 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 May 2018 06:36:43 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,436,1520924400"; d="scan'208";a="41881738" Received: from unknown (HELO localhost.localdomain) ([10.232.112.44]) by fmsmga007.fm.intel.com with ESMTP; 24 May 2018 06:36:42 -0700 Date: Thu, 24 May 2018 07:38:59 -0600 From: Keith Busch To: Jianchao Wang Cc: keith.busch@intel.com, axboe@fb.com, hch@lst.de, sagi@grimberg.me, linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org Subject: Re: [PATCH 2/2] nvme-pci: don't send delete cq command when allocate sq return -EINTR Message-ID: <20180524133859.GH11037@localhost.localdomain> References: <1527155494-1891-1-git-send-email-jianchao.w.wang@oracle.com> <1527155494-1891-2-git-send-email-jianchao.w.wang@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1527155494-1891-2-git-send-email-jianchao.w.wang@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 Thu, May 24, 2018 at 05:51:34PM +0800, Jianchao Wang wrote: > result = adapter_alloc_sq(dev, qid, nvmeq); > - if (result < 0) > + /* > + * If return -EINTR, it means the allocate sq command times out and is completed > + * with NVME_REQ_CANCELLED. At the time, the controller has been disabled > + * and admin request queue has been quiesced. So don't try to send delete cq > + * command any more. > + */ > + if (result == -EINTR) > + goto out; > + else if (result < 0) > goto release_cq; Since you're touching this part anyway, you'd really only want to goto the release_cq if result is > 0.