From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752175AbcFUPvU (ORCPT ); Tue, 21 Jun 2016 11:51:20 -0400 Received: from mail-bl2on0119.outbound.protection.outlook.com ([65.55.169.119]:34845 "EHLO na01-bl2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752013AbcFUPvL (ORCPT ); Tue, 21 Jun 2016 11:51:11 -0400 From: "Kani, Toshimitsu" To: "axboe@fb.com" , "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" , "dan.j.williams@intel.com" , "axboe@kernel.dk" , "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/oAoaAgAqtRoCAAAWsgIAAFjAAgAADUICAAAKLgIAAFViAgAASHACAAQDRgIAAH4oAgAABnoA= Date: Tue, 21 Jun 2016 15:50:40 +0000 Message-ID: <1466523627.3504.266.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> <1466457467.3504.249.camel@hpe.com> <20160620222236.GA22461@redhat.com> <20160621134147.GA26392@redhat.com> <1466523280.3504.262.camel@hpe.com> In-Reply-To: <1466523280.3504.262.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: d87d8278-3a1b-40ab-e40f-08d399ebcc15 x-microsoft-exchange-diagnostics: 1;CS1PR84MB0008;6:suIkmM6sYJIvLtPmcgkLRTkk0SLD/iD7xC8lGlXhsdjqxijhWt7F5GQVO8tibFMABSjRxQKHOnAI1toNIYEcbpe2QERo9XwodQJrSa1amem9uwia9zxFCgy/rrX0tAVjH4k7lDm3kc3Gh5FbazCYzXU+75i6GT6xLt/zuOHe6Uw431NkJDSvUMlA66xniAMTRARKijaXjt0/I9s5Gbwysy+HqkFSEyHEH8G3gJRAJx5aIU5vx083nuwm1bPJr1EaLwozGUuNMKi+PZ/NcLOpi4AsxRHvICGGHpcxVVYENBs=;5:ApkaGRtIwuTGDvMkxpicKNtAE97iSmF5eufMaH9CdHvFrkuREAb5lZsgzTG23WT//4Ce0Dx2UBy0vvb2rl5h1lAcHg8dvrQ8aciLa9vNxpilmcxl3U5tD+BzZnnxQ/6IG0i1nt5bPDseBFqCFD4jqQ==;24:1AAQTHfmSG58d71KDzwrnWDv0bq1BTQuwERk6DM+djzpA37R+BDLw80dIfj9ojSzSmw5gqb1YqkDqSDA0sC1HryZWjkX0SmE+DBPHMAS8ik=;7:PWwvHmhUP1Le1P3gQI1Bvo/MccHHIYLjsy8y1R91Nrokrfes6rYwyBdfCc1k7ZV+hmO0a/s4kEQj7pjPpZWK3EfJe6bT6PoXhamcPj3CliEFUp9cXMd9MxeBonNqK4YzWXTCP3SKSil7/2CTNXITAwmErlDr0X/ulLZLcmoKPNzI6biXvrsDv0t/gBpFZGW1XHgwlT7DipE8uio3DFf6qGDyndkW/iMteiayEKlI38kSfMwQudu5XGhDJeEE25OB 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: 098076C36C x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(7916002)(377424004)(189002)(199003)(24454002)(8676002)(2501003)(81156014)(92566002)(81166006)(189998001)(86362001)(2950100001)(68736007)(575784001)(2900100001)(6116002)(2906002)(50986999)(66066001)(87936001)(4326007)(5002640100001)(7846002)(54356999)(76176999)(3280700002)(3660700001)(106116001)(122556002)(77096005)(33646002)(106356001)(10400500002)(586003)(101416001)(19580395003)(8936002)(97736004)(36756003)(103116003)(19580405001)(3846002)(102836003)(5001770100001)(105586002)(99286002)(93886004)(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: <95537004090EDC409B06CD3DF3C92A4D@NAMPRD84.PROD.OUTLOOK.COM> MIME-Version: 1.0 X-OriginatorOrg: hpe.com X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Jun 2016 15:50:40.8731 (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 u5LFpOVP002506 On Tue, 2016-06-21 at 09:34 -0600, Kani, Toshimitsu wrote: > On Tue, 2016-06-21 at 09:41 -0400, Mike Snitzer wrote: > > > > On Mon, Jun 20 2016 at  6:22pm -0400, > > Mike Snitzer wrote: > > > > > > On Mon, Jun 20 2016 at  5:28pm -0400, > > > Kani, Toshimitsu wrote: > > > >  : > > > > > > Looks good, I folded it in and tested it to work.  Pushed to my 'wip' > > > branch. > > > > > > No longer seeing any corruption in my test that was using partitions > > > to span pmem devices with a dm-linear device. > > > > > > Jens, any chance you'd be open to picking up the first 2 patches in > > > this series?  Or would you like to see them folded or something > > > different? > > > > I'm now wondering if we'd be better off setting a new QUEUE_FLAG_DAX > > rather than establish GENHD_FL_DAX on the genhd? > > > > It'd be quite a bit easier to allow upper layers (e.g. XFS and ext4) to > > check for a queue flag. > > I think GENHD_FL_DAX is more appropriate since DAX does not use a request > queue, except for protecting the underlining device being disabled while > direct_access() is called (b2e0d1625e19).   Forgot to mention that there are bdev_dax_supported() and bdev_dax_capable() interfaces that can be called from upper layers.  They both call bdev_direct_access() which checks GENHD_FL_DAX. Thanks, -Toshi > About protecting direct_access, this patch assumes that the underlining > device cannot be disabled until dtr() is called.  Is this correct?  If > not, I will need to call dax_map_atomic(). > > Thanks, > -Toshi