mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
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 <[email protected]>
Acked-by: Dan Williams <[email protected]>
Signed-off-by: Mike Snitzer <[email protected]>
This commit is contained in:
parent
34c96507e8
commit
273752c9ff
3 changed files with 42 additions and 0 deletions
|
|
@ -278,6 +278,12 @@ 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);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(dax_write_cache_enabled);
|
||||
|
||||
bool dax_alive(struct dax_device *dax_dev)
|
||||
{
|
||||
lockdep_assert_held(&dax_srcu);
|
||||
|
|
|
|||
Loading…
Reference in a new issue