[dm-devel] dm, dax: Make sure dm_dax_flush() is called if device supports it
Vivek Goyal
vgoyal at redhat.com
Tue Jul 25 20:54:16 UTC 2017
On Tue, Jul 25, 2017 at 04:46:09PM -0400, Mike Snitzer wrote:
> On Tue, Jul 25 2017 at 3:43pm -0400,
> Vivek Goyal <vgoyal at 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 at redhat.com>
>
> In general this looks mostly OK.. but it seems a bit weird to on the one
> hand: test if DAXDEV_WRITE_CACHE is set on underlying device. And on
> the other: say it is a write cache because it is "flush_capable". Kind
> of blurring things a bit.
>
> Why not s/device_dax_flush_capable/device_dax_write_cache_enabled/ ?
Sounds good. I will rename it in next version.
Vivek
More information about the dm-devel
mailing list