From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751949AbdECXZp (ORCPT ); Wed, 3 May 2017 19:25:45 -0400 Received: from g9t5009.houston.hpe.com ([15.241.48.73]:57436 "EHLO g9t5009.houston.hpe.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750927AbdECXZm (ORCPT ); Wed, 3 May 2017 19:25:42 -0400 From: "Kani, Toshimitsu" To: "dan.j.williams@intel.com" CC: "linux-kernel@vger.kernel.org" , "dave.jiang@intel.com" , "linux-nvdimm@lists.01.org" Subject: Re: [RFC PATCH] dax: add badblocks check to Device DAX Thread-Topic: [RFC PATCH] dax: add badblocks check to Device DAX Thread-Index: AQHSxCJYsIkXTJcozUeBmwgaJMx1HaHiwjaAgAAEtwCAAAXrgIAAJiGAgAAy3QCAAA6sAIAAAvMAgAAEj4CAAATXAA== Date: Wed, 3 May 2017 23:25:38 +0000 Message-ID: <1493853934.30303.51.camel@hpe.com> References: <20170503153103.30756-1-toshi.kani@hpe.com> <1493827750.30303.44.camel@hpe.com> <1493837209.30303.47.camel@hpe.com> <1493851282.30303.49.camel@hpe.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=hpe.com; x-originating-ip: [15.219.163.8] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;AT5PR84MB0260;7:k5yGVCaN86MjFCIniCtHLbUcChea+6fv3bKmPZ7/bYLtb3P30lh0JkSrOCvU+S5ygAp4QE9b320BpLQ1frvvZZl2yMCndOs7jWBw+5ODqQmt+NH7/BSFf/ZBr0UzYRuxoLrPrGCoB6y6EexqAHnIBqSC4YA7WYLrUBrqrGGDyYV1CtupikHCU+qrEUsZX+amRVXhuubbU9/F5Az+neb3HunKqbihCTNSLlVYqZJM8VyLWptg1p0KXkErGekZWIijzQaeIp/XgTc3uoDmqJxOJIkbW1QzgjInUguiTemjXulCUP++gBaoFAZgTKLRBYkovdTv9pSfAEphqfw1OzIxbg== x-ms-office365-filtering-correlation-id: 68e12f1c-ebd5-44d5-d9a5-08d4927bb551 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(2017030254075)(48565401081)(201703131423075)(201703031133081);SRVR:AT5PR84MB0260; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(6040450)(601004)(2401047)(8121501046)(5005006)(93006095)(93001095)(10201501046)(3002001)(6055026)(6041248)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123564025)(20161123562025)(20161123555025)(20161123560025)(6072148);SRVR:AT5PR84MB0260;BCL:0;PCL:0;RULEID:;SRVR:AT5PR84MB0260; x-forefront-prvs: 029651C7A1 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(39860400002)(39850400002)(39450400003)(39840400002)(39400400002)(39410400002)(377424004)(377454003)(24454002)(51914003)(5250100002)(189998001)(66066001)(2950100002)(93886004)(54356999)(6916009)(103116003)(25786009)(36756003)(2900100001)(53546009)(229853002)(8676002)(81166006)(4326008)(76176999)(50986999)(3660700001)(8936002)(6436002)(5640700003)(6506006)(6486002)(6246003)(3280700002)(33646002)(110136004)(7736002)(305945005)(6116002)(102836003)(5660300001)(3846002)(478600001)(53936002)(2501003)(86362001)(38730400002)(54906002)(2906002)(2351001)(6512007);DIR:OUT;SFP:1102;SCL:1;SRVR:AT5PR84MB0260;H:AT5PR84MB0260.NAMPRD84.PROD.OUTLOOK.COM;FPR:;SPF:None;MLV:sfv;LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="utf-8" Content-ID: <47247DBBE082184CB7A91395628534BC@NAMPRD84.PROD.OUTLOOK.COM> MIME-Version: 1.0 X-MS-Exchange-CrossTenant-originalarrivaltime: 03 May 2017 23:25:38.5984 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 105b2061-b669-4b31-92ac-24d304d195dc X-MS-Exchange-Transport-CrossTenantHeadersStamped: AT5PR84MB0260 X-OriginatorOrg: hpe.com Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by mail.home.local id v43NQ4hM004818 On Wed, 2017-05-03 at 16:08 -0700, Dan Williams wrote: > On Wed, May 3, 2017 at 3:51 PM, Dan Williams m> wrote: > > On Wed, May 3, 2017 at 3:41 PM, Kani, Toshimitsu > m> wrote: > > > On Wed, 2017-05-03 at 14:48 -0700, Dan Williams wrote: : > > > > I believe we already have all the data needed to calculate the data > > offset. Given the following sysfs path: > > > >     /sys/devices/LNXSYSTM:00/LNXSYBUS:00/ACPI0012:00/ndbus0/region1 > > /dax1.1/dax/dax1.0 > > > > ...we can find the associated namespace device from that dax1.1. > > From > > there we have the base address of the namespace and the size > > device-dax instance. > > > >     device_dax_data_offset == namespace_base + namespace_size - > > device_dax_size > > Dave reminds me that we do have the data offset of the device-dax > instance at the libnvdimm level: > >     /sys/devices/LNXSYSTM:00/LNXSYBUS:00/ACPI0012:00/ndbus0/region1/d > ax1.1/resource > > ...in this example, which maps to ndctl_dax_get_resource(). Thanks for the info! I noticed why I did not catch this info before. # ll /dev/dax* crw------- 1 root root 251, 3 May  3 04:28 /dev/dax0.0 # pwd /sys/devices/LNXSYSTM:00/LNXSYBUS:00/ACPI0012:00/ndbus0/region0/dax0.0 # grep . * align:2097152 devtype:nd_dax modalias:nd:t7 mode:none numa_node:0 grep: power: Is a directory grep: resource: No such device or address grep: size: No such device or address grep: subsystem: Is a directory uevent:DEVTYPE=nd_dax uevent:MODALIAS=nd:t7 But I noticed that "resource" and "size" that are under ".../region0/dax0.1" work. Is this intended? -Toshi