From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from g1t5424.austin.hp.com (g1t5424.austin.hp.com [15.216.225.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 73BD01A1ECA for ; Mon, 9 May 2016 15:59:49 -0700 (PDT) Message-ID: <1462834244.27137.117.camel@hpe.com> Subject: Re: [PATCH v3 2/5] block: Add bdev_supports_dax() for dax mount checks From: Toshi Kani Date: Mon, 09 May 2016 16:50:44 -0600 In-Reply-To: <1462833254.27137.113.camel@hpe.com> References: <1462494596-20938-1-git-send-email-toshi.kani@hpe.com> <1462494596-20938-3-git-send-email-toshi.kani@hpe.com> <1462817565.27137.102.camel@hpe.com> <20160509211903.GW18496@dastard> <1462833254.27137.113.camel@hpe.com> Mime-Version: 1.0 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" To: Dave Chinner , Dan Williams Cc: Jens Axboe , Jan Kara , "linux-nvdimm@lists.01.org" , "linux-kernel@vger.kernel.org" , micah.parrish@hpe.com, Christoph Hellwig , Andreas Dilger , Al Viro , linux-fsdevel , Theodore Ts'o List-ID: T24gTW9uLCAyMDE2LTA1LTA5IGF0IDE2OjM0IC0wNjAwLCBUb3NoaSBLYW5pIHdyb3RlOgo+IE9u IFR1ZSwgMjAxNi0wNS0xMCBhdCAwNzoxOSArMTAwMCwgRGF2ZSBDaGlubmVyIHdyb3RlOgrCoDoK PiA+ID4gPiA+IAo+ID4gPiA+ID4gVGhpcyBwYXRjaCBzaG91bGQgcmVwbGFjZSBibGtkZXZfZGF4 X2NhcGFibGUoKSwgb3IganVzdCByZXVzZQo+ID4gPiA+ID4gdGhhdCBleGlzdGluZyByb3V0aW5l LCBvciBhbSBJIG1pc3Npbmcgc29tZXRoaW5nPwo+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fX19fX19fX19fX19fX19fX19fX19fX19fX19fCkxpbnV4LW52ZGltbSBtYWls aW5nIGxpc3QKTGludXgtbnZkaW1tQGxpc3RzLjAxLm9yZwpodHRwczovL2xpc3RzLjAxLm9yZy9t YWlsbWFuL2xpc3RpbmZvL2xpbnV4LW52ZGltbQo= From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from g1t5424.austin.hp.com ([15.216.225.54]:55143 "EHLO g1t5424.austin.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752242AbcEIW7t (ORCPT ); Mon, 9 May 2016 18:59:49 -0400 Message-ID: <1462834244.27137.117.camel@hpe.com> Subject: Re: [PATCH v3 2/5] block: Add bdev_supports_dax() for dax mount checks From: Toshi Kani To: Dave Chinner , Dan Williams Cc: Christoph Hellwig , Jan Kara , "linux-nvdimm@lists.01.org" , "linux-kernel@vger.kernel.org" , micah.parrish@hpe.com, Jens Axboe , Andreas Dilger , Al Viro , linux-fsdevel , Theodore Ts'o Date: Mon, 09 May 2016 16:50:44 -0600 In-Reply-To: <1462833254.27137.113.camel@hpe.com> References: <1462494596-20938-1-git-send-email-toshi.kani@hpe.com> <1462494596-20938-3-git-send-email-toshi.kani@hpe.com> <1462817565.27137.102.camel@hpe.com> <20160509211903.GW18496@dastard> <1462833254.27137.113.camel@hpe.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Mon, 2016-05-09 at 16:34 -0600, Toshi Kani wrote: > On Tue, 2016-05-10 at 07:19 +1000, Dave Chinner wrote:  : > > > > > > > > > > This patch should replace blkdev_dax_capable(), or just reuse > > > > > that existing routine, or am I missing something? > > > > > > > > Good question.  bdev_supports_dax() is a helper function tailored > > > > for the filesystem's mount -o dax case.  While blkdev_dax_capable() > > > > is similar, it does not need error messages like "device does not > > > > support dax" since it implicitly enables dax when capable.  So, I > > > > think we can keep blkdev_dax_capable(), but change it to call > > > > bdev_direct_access() so that actual check is performed in a single > > > > place. > > > > > > Sounds good to me. > > > > Can you name them consistently then? i.e. blkdev_dax_supported() and > > blkdev_dax_capable()? > > Sure.  Will do. I will keep the "bdev_" prefix to be consistent with bdev_direct_access(), i.e. bdev_dax_supported() and bdev_dax_capable(). -Toshi From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753442AbcEIW7u (ORCPT ); Mon, 9 May 2016 18:59:50 -0400 Received: from g1t5424.austin.hp.com ([15.216.225.54]:55143 "EHLO g1t5424.austin.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752242AbcEIW7t (ORCPT ); Mon, 9 May 2016 18:59:49 -0400 Message-ID: <1462834244.27137.117.camel@hpe.com> Subject: Re: [PATCH v3 2/5] block: Add bdev_supports_dax() for dax mount checks From: Toshi Kani To: Dave Chinner , Dan Williams Cc: Christoph Hellwig , Jan Kara , "linux-nvdimm@lists.01.org" , "linux-kernel@vger.kernel.org" , micah.parrish@hpe.com, Jens Axboe , Andreas Dilger , Al Viro , linux-fsdevel , "Theodore Ts'o" Date: Mon, 09 May 2016 16:50:44 -0600 In-Reply-To: <1462833254.27137.113.camel@hpe.com> References: <1462494596-20938-1-git-send-email-toshi.kani@hpe.com> <1462494596-20938-3-git-send-email-toshi.kani@hpe.com> <1462817565.27137.102.camel@hpe.com> <20160509211903.GW18496@dastard> <1462833254.27137.113.camel@hpe.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.18.5.2 (3.18.5.2-1.fc23) Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2016-05-09 at 16:34 -0600, Toshi Kani wrote: > On Tue, 2016-05-10 at 07:19 +1000, Dave Chinner wrote:  : > > > > > > > > > > This patch should replace blkdev_dax_capable(), or just reuse > > > > > that existing routine, or am I missing something? > > > > > > > > Good question.  bdev_supports_dax() is a helper function tailored > > > > for the filesystem's mount -o dax case.  While blkdev_dax_capable() > > > > is similar, it does not need error messages like "device does not > > > > support dax" since it implicitly enables dax when capable.  So, I > > > > think we can keep blkdev_dax_capable(), but change it to call > > > > bdev_direct_access() so that actual check is performed in a single > > > > place. > > > > > > Sounds good to me. > > > > Can you name them consistently then? i.e. blkdev_dax_supported() and > > blkdev_dax_capable()? > > Sure.  Will do. I will keep the "bdev_" prefix to be consistent with bdev_direct_access(), i.e. bdev_dax_supported() and bdev_dax_capable(). -Toshi