Re: [PATCH v3 2/5] block: Add bdev_supports_dax() for dax mount checks

From: Toshi Kani
Date: Mon May 09 2016 - 18:59:53 EST


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