From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753343AbcFTWFu (ORCPT ); Mon, 20 Jun 2016 18:05:50 -0400 Received: from mail-bn1bon0144.outbound.protection.outlook.com ([157.56.111.144]:61061 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751577AbcFTWFh (ORCPT ); Mon, 20 Jun 2016 18:05:37 -0400 From: "Kani, Toshimitsu" To: "snitzer@redhat.com" CC: "linux-kernel@vger.kernel.org" , "sandeen@redhat.com" , "linux-nvdimm@ml01.01.org" , "agk@redhat.com" , "linux-raid@vger.kernel.org" , "viro@zeniv.linux.org.uk" , "axboe@kernel.dk" , "dan.j.williams@intel.com" , "ross.zwisler@linux.intel.com" , "dm-devel@redhat.com" Subject: Re: [PATCH 0/6] Support DAX for device-mapper dm-linear devices Thread-Topic: [PATCH 0/6] Support DAX for device-mapper dm-linear devices Thread-Index: AQHRxcNvFc0gDtWw/UKSuO/qIYbBN5/oAoaAgAqtRoCAAAWsgIAAFjAAgAADUICAAAKLgIAAFViA Date: Mon, 20 Jun 2016 21:28:00 +0000 Message-ID: <1466457467.3504.249.camel@hpe.com> References: <1465856497-19698-1-git-send-email-toshi.kani@hpe.com> <20160613225756.GA18417@redhat.com> <20160620180043.GA21261@redhat.com> <1466446861.3504.243.camel@hpe.com> <20160620194026.GA21657@redhat.com> <20160620195217.GB21657@redhat.com> <1466452883.3504.244.camel@hpe.com> In-Reply-To: <1466452883.3504.244.camel@hpe.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=toshi.kani@hpe.com; x-originating-ip: [15.219.163.9] x-ms-office365-filtering-correlation-id: 1432520f-fe2c-4de9-8bf5-08d39951c12f x-microsoft-exchange-diagnostics: 1;CS1PR84MB0008;6:z7A/2EjR1Kxx37VgH0/c7eTBHyp9Exb/ibWENN3wKQMeFAdbvleftWNiaib7HQLqIXxCAqUB8rcHel7Bk454Xjc1YupMX648xeVom8546BipGPipbPCKKtkVH1+qfVF3eWya7seQlDeO+a4e/ZeJqar0AW0+89+oQoVqfswQ86vkYk49zNCm6/NxWzGtK8czrRDpEhEi73egLt6JfAF3+WbP+SsSI6BxPTBVaYBLpW2CGLGIzUmNkFmpZVU92wCnLan1eGLUnC5R02taUnqKj0yVQy5n2OvR66Z/UYcj4p4=;5:aglUT/WyyQD319uMWhBdzaYzm7fP/+iJ/BpHIhQs7hj57FTExclyv6EUWuVXSlZQwpeIaq5kNkTMN1OZtFUzMJKlRbouJathpJSyP43dBHgszHhi4CwHNtm47e0JmIYuVZfIz1ncxfZ2BRttPtYNcw==;24:lysRn92eDRXsCmgR07voB8h2LVhFJiZsH4FXW1pKO7cwRr7VaJ3wD13T1A5LwhkiF2+PzPy/SZK8iwvUuzziNjG6rK1rmGhAXBSe2DXGYTs=;7:dApwiUoRcaLYmW8OcJjzT3CmkR/cbJtfQrmXMrklaoOceyP2Ew5yPW5YYAwocJhmVQCPiAsk8uLMIThug0446gDSSfvpQR4k1ggc4/5DW91X75BvbdYsl7AqfoP+oad3L83+UT/5WYabDMRDFoA5DBIJX3hTeKw+aCaS7n7GYWxJn10R6EhsdUWdABiwwsHShR5UAicEM2CUQJnmNzEvkS8OjcCPlrTY3YEOQl1adwKI0FirJSSuiu5nrXX+uBrQ x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:CS1PR84MB0008; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(227479698468861); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001);SRVR:CS1PR84MB0008;BCL:0;PCL:0;RULEID:;SRVR:CS1PR84MB0008; x-forefront-prvs: 09796A1B83 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(7916002)(377424004)(189002)(199003)(24454002)(81156014)(8676002)(1730700003)(92566002)(81166006)(7846002)(86362001)(2501003)(189998001)(2950100001)(68736007)(2900100001)(66066001)(50986999)(87936001)(5002640100001)(4326007)(54356999)(2906002)(77096005)(76176999)(2351001)(3280700002)(3660700001)(106116001)(122556002)(110136002)(11100500001)(33646002)(10400500002)(106356001)(586003)(101416001)(6116002)(103116003)(19580395003)(8936002)(19580405001)(102836003)(3846002)(105586002)(5640700001)(99286002)(93886004)(36756003)(97736004)(7736002);DIR:OUT;SFP:1102;SCL:1;SRVR:CS1PR84MB0008;H:CS1PR84MB0005.NAMPRD84.PROD.OUTLOOK.COM;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="utf-8" Content-ID: <6BF6767E1A048D4E8255034D80B96A64@NAMPRD84.PROD.OUTLOOK.COM> MIME-Version: 1.0 X-OriginatorOrg: hpe.com X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Jun 2016 21:28:00.0500 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 105b2061-b669-4b31-92ac-24d304d195dc X-MS-Exchange-Transport-CrossTenantHeadersStamped: CS1PR84MB0008 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 u5KM5rRR028059 On Mon, 2016-06-20 at 14:01 -0600, Kani, Toshimitsu wrote: > On Mon, 2016-06-20 at 15:52 -0400, Mike Snitzer wrote: > > > > On Mon, Jun 20 2016 at  3:40pm -0400, > > Mike Snitzer wrote: > >    : > > > If I don't use XFS, and only issue IO directly to the /dev/pmem/lv, I > > > don't see this corruption. > > > > I did the same test with ext4 instead of xfs and it resulted in the same > > type of systemic corruption (lvm2 metadata corrupted too): > >  : > I will look into the issue. Hi Mike, Can you fold the following patch to the dm-linear patch? Thanks, -Tsohi ------ Subject: [PATCH] dm-linear: Fix partition handling for DAX Partition handling was missing in linear_direct_access(). Call bdev_direct_access(), instead of directly calling target direct_access function. Signed-off-by: Toshi Kani ---  drivers/md/dm-linear.c |   14 ++++++++++----  1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/drivers/md/dm-linear.c b/drivers/md/dm-linear.c index 325aa06..38323e4 100644 --- a/drivers/md/dm-linear.c +++ b/drivers/md/dm-linear.c @@ -148,10 +148,16 @@ static long linear_direct_access(struct dm_target *ti, sector_t sector,  {   struct linear_c *lc = ti->private;   struct block_device *bdev = lc->dev->bdev; - const struct block_device_operations *bd_ops = bdev->bd_disk->fops; - - return bd_ops->direct_access(bdev, linear_map_sector(ti, sector), -      kaddr, pfn, size); + struct blk_dax_ctl dax = { + .sector = linear_map_sector(ti, sector), + .size = size, + }; + long ret; + + ret = bdev_direct_access(bdev, &dax); + *kaddr = dax.addr; + *pfn = dax.pfn; + return ret;  }    static struct target_type linear_target = {