Re: [PATCH V3 02/21] dax: add fsdev.c driver for fs-dax on character dax

From: John Groves
Date: Thu Jan 08 2026 - 11:24:51 EST


On 26/01/08 11:31AM, Jonathan Cameron wrote:
> On Wed, 7 Jan 2026 09:33:11 -0600
> John Groves <John@xxxxxxxxxx> wrote:
>
> > The new fsdev driver provides pages/folios initialized compatibly with
> > fsdax - normal rather than devdax-style refcounting, and starting out
> > with order-0 folios.
> >
> > When fsdev binds to a daxdev, it is usually (always?) switching from the
> > devdax mode (device.c), which pre-initializes compound folios according
> > to its alignment. Fsdev uses fsdev_clear_folio_state() to switch the
> > folios into a fsdax-compatible state.
> >
> > A side effect of this is that raw mmap doesn't (can't?) work on an fsdev
> > dax instance. Accordingly, The fsdev driver does not provide raw mmap -
> > devices must be put in 'devdax' mode (drivers/dax/device.c) to get raw
> > mmap capability.
> >
> > In this commit is just the framework, which remaps pages/folios compatibly
> > with fsdax.
> >
> > Enabling dax changes:
> >
> > * bus.h: add DAXDRV_FSDEV_TYPE driver type
> > * bus.c: allow DAXDRV_FSDEV_TYPE drivers to bind to daxdevs
> > * dax.h: prototype inode_dax(), which fsdev needs
> >
> > Suggested-by: Dan Williams <dan.j.williams@xxxxxxxxx>
> > Suggested-by: Gregory Price <gourry@xxxxxxxxxx>
> > Signed-off-by: John Groves <john@xxxxxxxxxx>
>
> > diff --git a/drivers/dax/Kconfig b/drivers/dax/Kconfig
> > index d656e4c0eb84..491325d914a8 100644
> > --- a/drivers/dax/Kconfig
> > +++ b/drivers/dax/Kconfig
> > @@ -78,4 +78,21 @@ config DEV_DAX_KMEM
> >
> > Say N if unsure.
> >
> > +config DEV_DAX_FS
> > + tristate "FSDEV DAX: fs-dax compatible device driver"
> > + depends on DEV_DAX
> > + default DEV_DAX
>
> What's the logic for the default? Generally I'd not expect a
> default for something new like this (so default of default == no)

My thinking is that this is harmless unless you use it, but if you
need it you need it. So defaulting to include the module seems
viable.

[ ... ]

John