dm, dax: Make sure dm_dax_flush() is called if device supports it
authorVivek Goyal <vgoyal@redhat.com>
Wed, 26 Jul 2017 13:35:09 +0000 (09:35 -0400)
committerMike Snitzer <snitzer@redhat.com>
Wed, 26 Jul 2017 19:55:44 +0000 (15:55 -0400)
commit273752c9ff03eb83856601b2a3458218bb949e46
tree2248ae6002c2deed099fcc0657c8665c2015d949
parent34c96507e8f6be497c15497be05f489fb34c5880
dm, dax: Make sure dm_dax_flush() is called if device supports it

Currently dm_dax_flush() is not being called, even if underlying dax
device supports write cache, because DAXDEV_WRITE_CACHE is not being
propagated up to the DM dax device.

If the underlying dax device supports write cache, set
DAXDEV_WRITE_CACHE on the DM dax device.  This will cause dm_dax_flush()
to be called.

Fixes: abebfbe2f7 ("dm: add ->flush() dax operation support")
Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Acked-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/dax/super.c
drivers/md/dm-table.c
include/linux/dax.h