Linux-NVDIMM Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Vivek Goyal <vgoyal@redhat.com>
To: Dan Williams <dan.j.williams@intel.com>
Cc: dm-devel@redhat.com, Mike Snitzer <snitzer@redhat.com>,
	"linux-nvdimm@lists.01.org" <linux-nvdimm@lists.01.org>
Subject: Re: [PATCH] dm,dax: Make sure dm_dax_flush() is called if device supports it
Date: Tue, 25 Jul 2017 16:51:17 -0400	[thread overview]
Message-ID: <20170725205117.GB20979@redhat.com> (raw)
In-Reply-To: <CAPcyv4gqyOjBTFDbXbSYqxPQzY2cAjA6=zi6+51cN=Hae7eDJQ@mail.gmail.com>

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@redhat.com> 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@redhat.com>
> > ---
> >  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@intel.com>
_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm

  reply	other threads:[~2017-07-25 20:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-25 19:43 [PATCH] dm,dax: Make sure dm_dax_flush() is called if device supports it Vivek Goyal
2017-07-25 20:43 ` Dan Williams
2017-07-25 20:51   ` Vivek Goyal [this message]
2017-07-25 20:46 ` Mike Snitzer
2017-07-25 20:54   ` Vivek Goyal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170725205117.GB20979@redhat.com \
    --to=vgoyal@redhat.com \
    --cc=dan.j.williams@intel.com \
    --cc=dm-devel@redhat.com \
    --cc=linux-nvdimm@lists.01.org \
    --cc=snitzer@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox