Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp5352417yba; Mon, 13 May 2019 09:23:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqyPsQtUh+3p7AYy3C72zgagA3J44rC8vczta99tIPC6px9cHCCw2Rx9IlfMoSW8Cvrt9SLv X-Received: by 2002:a17:902:8305:: with SMTP id bd5mr7920138plb.339.1557764638460; Mon, 13 May 2019 09:23:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557764638; cv=none; d=google.com; s=arc-20160816; b=nzkP84hB2ARl6lOFuVym7oWE+XLXaDJH6xoby9TaLTaf2js3uq6VWWudKa8Yxz+pWZ y6qEmtffjzjRSILvhMZtbhi+Xr0GmhLvcF5JhWI1oFBOBCWO7MHLAAYlwVAmc9IGWH+t 0H67TZIjA+jtFnGh8gvXkTt1cDb5lbSerr3xZc+3sBVAC6KaOEaLCR+4bkysIddaJ2QN 4K2nsfB/7YrKJ9k7tCdKF9AErivgYuYzPE7kXs848UGSjKT+ZDyKxn6mOrIRdiOu/Il4 CudpztlbCT7pwcRsfFytToJRsyvI7snPs96B8e9Y4VHtD90J21tDMeua2i4Pod68V1XW Dl/A== 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:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=wqVVN3IIgShUqzAShGWEI+byOb6ln1yA8gH7qqjTguw=; b=TDOLNBqRgFiN9azNK1TPd7nFrYzhQp7Dh1zOhJBzUChAA0XPHAhNmbI8HlkbT0zVKa kUKy2PoFKxzn8sOT9zjcCwkVc+Jm4vSJEkC9s4xJZgRqgmVowGrbq72gYe1tf193rBN+ V6K7tEL3j4yFV3OnkktH1rNMyco9ux+XaoVonTL1MozB2tit/McKm5uI58zJAYu8KwJ4 vlxJsvWAO1HIDs96XmNSMFmY3OBsfd9hi5MPESEQOz4PdqomRlC3LTk6V+WJU5Ag3iER cgK7vNwFyNrpKK7JgnWf6fZOeFgx0SMrurUhewlXoU6T6Dhu0EY3cJZJcx9Fq6pdV3OR E51Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=BwZRENip; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d11si17629356pfr.109.2019.05.13.09.23.42; Mon, 13 May 2019 09:23:58 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=BwZRENip; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730746AbfEMPBT (ORCPT + 99 others); Mon, 13 May 2019 11:01:19 -0400 Received: from mail-pf1-f196.google.com ([209.85.210.196]:47013 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726738AbfEMPBS (ORCPT ); Mon, 13 May 2019 11:01:18 -0400 Received: by mail-pf1-f196.google.com with SMTP id y11so7336534pfm.13 for ; Mon, 13 May 2019 08:01:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=wqVVN3IIgShUqzAShGWEI+byOb6ln1yA8gH7qqjTguw=; b=BwZRENipTYdf44NKxuyIB0lt0XfhTgELdsx+5j8XBjRFb4y/gV+ZkXtYj+r8r7aZuE 8nMs3gaatVq38w7uj5RBuigzmFBSXh0JM0xwYo0aSV259ZAmfyql1d34478aub07/vGx GeIFAuf9+TaN6NDBgMLsPYbCWPgBjUwJZc5OWRPXGELo6EgPmnDLk6jOGqtmFIng6+fd 9vEG5i1/qTvnhqwcerEvL7E5fXKNY4YqvpriP40b0rqNnZ/fkVBHGJMXu89Opfuqus5h fPsB+H4DtY/Nz4lMdzuUJojeg2DPdESrd4kx3MqgHADcInwqA9CWyBNPxSe4BKCQ/cDj EM4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=wqVVN3IIgShUqzAShGWEI+byOb6ln1yA8gH7qqjTguw=; b=UUTa/P5/dnNXIVJ4RRHwD/Cq6ZiSntI1q94xIVpMfO9j8+Ly4LoMb1+l5CUdbp9wu1 nMDsZLAij/hcWg8r7TBX7vxrr67fPfhccSmYBCGj2QI38x8FmvO68znZ1wliCj88dUCj FhSpIjTYqZqvOcf4wX2QLK+8mr+F+pkFobW374A5QuS/n73MJqCddfs7Pn1D4QBb/nIE NiBSwruDnQ2NqgYzdCFNlxVxj8Z8WdUhzKWbvaeZyv5LdFB8DKeugRvadfYwQP0QBhkY lP2dbe3Q8F/GiVmhHM8N+KQL4KnrYXZfIIV9lwuufmD1aqqBe0DZeT+ObQSsL1VVvWTV 5nsw== X-Gm-Message-State: APjAAAW9vjt+bwpgx34ZeitE3/doiJvcJSAFRqbzWQQz37RCtgYvBE6e pSkK0YElxM3QCp1RFUJNT0ubVg8ZknaNIMTz7TQ= X-Received: by 2002:aa7:9214:: with SMTP id 20mr33394163pfo.202.1557759678130; Mon, 13 May 2019 08:01:18 -0700 (PDT) MIME-Version: 1.0 References: <1557676457-4195-1-git-send-email-akinobu.mita@gmail.com> <1557676457-4195-6-git-send-email-akinobu.mita@gmail.com> <20190513135031.GC15318@localhost.localdomain> In-Reply-To: <20190513135031.GC15318@localhost.localdomain> From: Akinobu Mita Date: Tue, 14 May 2019 00:01:07 +0900 Message-ID: Subject: Re: [PATCH v3 5/7] nvme-pci: add device coredump infrastructure To: Keith Busch Cc: "linux-nvme@lists.infradead.org" , "linux-kernel@vger.kernel.org" , Johannes Berg , "Busch, Keith" , Jens Axboe , Christoph Hellwig , Sagi Grimberg , Minwoo Im , "Heitke, Kenneth" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2019=E5=B9=B45=E6=9C=8813=E6=97=A5(=E6=9C=88) 22:55 Keith Busch : > > On Sun, May 12, 2019 at 08:54:15AM -0700, Akinobu Mita wrote: > > +static void nvme_coredump_logs(struct nvme_dev *dev) > > +{ > > + struct dev_coredumpm_bulk_data *bulk_data; > > + > > + if (!dev->dumps) > > + return; > > + > > + bulk_data =3D nvme_coredump_alloc(dev, 1); > > + if (!bulk_data) > > + return; > > + > > + if (nvme_coredump_telemetry_log(bulk_data, &dev->ctrl)) > > + dev->num_dumps--; > > +} > > You'll need this function to return the same 'int' value from > nvme_coredump_telemetry_log. A negative value here means that the > device didn't produce a response, and that's important to check from > the reset work since you'll need to abort the reset if that happens. OK. Make sense.