Re: [PATCH] dm, dax: Make sure dm_dax_flush() is called if device supports it

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jul 25, 2017 at 01:43:27PM -0700, Dan Williams wrote:
> On Tue, Jul 25, 2017 at 12:43 PM, Vivek Goyal <vgoyal@xxxxxxxxxx> wrote:
> > Right now, dm_dax_flush() is not being called and I think it is not being
> > called becuase DAXDEV_WRITE_CACHE is not set on dm dax device.
> >
> > If underlying dax device supports write cache, set DAXDEV_WRITE_CACHE on
> > dm dax device. This will get dm_dax_flush() being called.
> >
> > Signed-off-by: Vivek Goyal <vgoyal@xxxxxxxxxx>
> > ---
> >  drivers/dax/super.c   |  5 +++++
> >  drivers/md/dm-table.c | 33 +++++++++++++++++++++++++++++++++
> >  include/linux/dax.h   |  1 +
> >  3 files changed, 39 insertions(+)
> >
> > diff --git a/drivers/dax/super.c b/drivers/dax/super.c
> > index ce9e563e6e1d..5c5e7b9f6831 100644
> > --- a/drivers/dax/super.c
> > +++ b/drivers/dax/super.c
> > @@ -278,6 +278,11 @@ void dax_write_cache(struct dax_device *dax_dev, bool wc)
> >  }
> >  EXPORT_SYMBOL_GPL(dax_write_cache);
> >
> > +bool dax_write_cache_enabled(struct dax_device *dax_dev)
> > +{
> > +       return test_bit(DAXDEV_WRITE_CACHE, &dax_dev->flags);
> > +}
> 
> We need :
> 
>     EXPORT_SYMBOL_GPL(dax_write_cache_enabled)
> 
> ...but other than that, looks good to me.

Aha, missed that. Will fix in next version.

Vivek
> 
> Acked-by: Dan Williams <dan.j.williams@xxxxxxxxx>

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel



[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux