Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp5318933yba; Wed, 8 May 2019 11:14:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqwXzkLlcgOiCeyh5mHzroOnxjI7/aKXSedFXvRapvkB9MkRn2BlNC0VtPBS1UAHHTdaLYpN X-Received: by 2002:a63:7d03:: with SMTP id y3mr47362868pgc.8.1557339246970; Wed, 08 May 2019 11:14:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557339246; cv=none; d=google.com; s=arc-20160816; b=JwBimDRMv3lLJw3ZSOxHztrrYgdvBvYV1KF+29ojAwtM2KChK9EqJQbKy1m7y0ThSK SurCfKn0z3gBnIsxt69lZfEoO6etcEnZ6ig8hqk+Zy6uopCHzJNz/RRaI7VIEKtyXuWp 9wsMorsohQAV1AMohL9WAj248Gq5x76xovvu8DKtWrMOMKfAF8P+Tj1P+0mhdgefGn3D I1vNhrObdBFORIhCngkbbv+7Rrqbdva45vy5RF/zNsn2aGw8msuEFSr1U644jSLTFI9c 8d/pSZHnXY7A1jjmLuPRdudYr+0bmbQgggtNyK1tvoWT7ep9yzcwrEGkOf+9IROHk0Os KYxA== 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=iBHtYpRsc712Jhf8r1jzS0KUOogBgaASzE45fG6Wcrk=; b=CAhUapX60tocyLNTVmVq8u44FqwHM+bwgPJYtkazr2NZ7xwN/cwems6E94vNozEoHy /n/GwxJ2avfrgaQ2n71SL/naro4gp6iC5zIO6PXbY0EiSl7m86kXavJvr87R617Zn6Xj olcesKAhaBbtW9APq5pNXFy7PGTE8TA9e050jTBPgvg4XTdX37nfbJko8Fe+JXOYO/db JatLkOyKdle8I/Af6eEhc9Ms0H9x2/1m6+LLfnNU/vFKAX/w/sB/BCFxWL5ARrrlgV58 YVPloTOy+8t0uSJMu++EOLSf8YLig4EwF23DFnXrqlZN7FJSDqShv01Ftp52uVjUVTux 04pw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=oVTDq0Vg; 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 h1si3212461pgp.232.2019.05.08.11.13.50; Wed, 08 May 2019 11:14:06 -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=oVTDq0Vg; 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 S1727352AbfEHP4g (ORCPT + 99 others); Wed, 8 May 2019 11:56:36 -0400 Received: from mail-pg1-f195.google.com ([209.85.215.195]:44991 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726506AbfEHP4f (ORCPT ); Wed, 8 May 2019 11:56:35 -0400 Received: by mail-pg1-f195.google.com with SMTP id z16so10297508pgv.11 for ; Wed, 08 May 2019 08:56:35 -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=iBHtYpRsc712Jhf8r1jzS0KUOogBgaASzE45fG6Wcrk=; b=oVTDq0VgZYvgpI1y9y4+DccGKoeBrl6DvatY0dzm2NiYUXphf/oYmeygPHZCSY2QvA pmz0UOwGi93pZPyP7X4Gy2XPKYYVjHQVuG37fccJvZbAdlGUzB9c75qKridESGgLPD4M lse3wmXa1uCUzlwmoichBtUOV9S86GKIE0562diLN8zZlzmZA2Z7/d9zqCVsmqrq7yxm v4LFcVsRg1TgtMoXaM2aem82JBVmNWyeu5PXsWjILO1lbGo/WIFjjSj/pTIcSBb0JFhQ 3e/xomKGMP+8lUxxl/1eIR/OXH8kqXqg35zZcR9uE+KKG+Gf22knKmo7VnWYP9hKNvnQ F3uw== 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=iBHtYpRsc712Jhf8r1jzS0KUOogBgaASzE45fG6Wcrk=; b=BUHDmzkBB2snzX55fu54miHmn5i3NUkkvig3Ove6AXJa1/97SwpO5IKCtFKr12p+Fb p0ZzjA775XSzqT2CzLCUYsgoumb9UGtd9fORiK5vjodLOVmzrFDFBOP5b4RNglnXIHYS G49zO+1u7uTc4s+1Q7eQF4BDcNCbtBkInaVuPFl/SE26aisLrWE6plPwFgjbB9cCZt8D 2YcV1Mfy1vyyhRpl1HQia1zYht0uoodUxudcHsbHxCv+iICl1RixP9nzDqOHObjy8qXO u/u8cvkwIi7BK0Hchh5LAzI7+QKeNqxfszvufPE8QcgOdWi7MB7ZPj9P8Ow1RF3JSbiO zghQ== X-Gm-Message-State: APjAAAXnkUgi6/Q/Tlx7nZSn9fqj/N5xPDuS5pCRI8NmZRTtxtzzHcwT QclaDvQSnlNxnY1givt2B8isotTNw8ZoLWmfoyUk6lWS X-Received: by 2002:a65:480c:: with SMTP id h12mr46853626pgs.266.1557330995251; Wed, 08 May 2019 08:56:35 -0700 (PDT) MIME-Version: 1.0 References: <1557248314-4238-1-git-send-email-akinobu.mita@gmail.com> <1557248314-4238-7-git-send-email-akinobu.mita@gmail.com> <20190507212241.GA7113@localhost.localdomain> In-Reply-To: <20190507212241.GA7113@localhost.localdomain> From: Akinobu Mita Date: Thu, 9 May 2019 00:56:24 +0900 Message-ID: Subject: Re: [PATCH v2 6/7] nvme-pci: add device coredump support To: Keith Busch Cc: "Heitke, Kenneth" , linux-nvme@lists.infradead.org, LKML , Jens Axboe , Sagi Grimberg , Keith Busch , Minwoo Im , Johannes Berg , Christoph Hellwig 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=888=E6=97=A5(=E6=B0=B4) 6:28 Keith Busch : > > On Tue, May 07, 2019 at 02:31:41PM -0600, Heitke, Kenneth wrote: > > On 5/7/2019 10:58 AM, Akinobu Mita wrote: > > > + > > > +static int nvme_get_telemetry_log_blocks(struct nvme_ctrl *ctrl, voi= d *buf, > > > + size_t bytes, loff_t offset) > > > +{ > > > + const size_t chunk_size =3D ctrl->max_hw_sectors * ctrl->page_siz= e; > > > > Just curious if chunk_size is correct since page size and block size ca= n > > be different. > > They're always different. ctrl->page_size is hard-coded to 4k, while > sectors are always 512b. Oops. I misunderstood how ctrl->max_hw_sectors is initialized from MDTS. Also overflow check was required here for the architectures that use "unsigned int" size_t.