filesystem-dax: convert to dax_flush()
authorDan Williams <dan.j.williams@intel.com>
Mon, 29 May 2017 20:07:46 +0000 (13:07 -0700)
committerDan Williams <dan.j.williams@intel.com>
Thu, 15 Jun 2017 21:35:24 +0000 (14:35 -0700)
commit6318770a7d43a4166b6a8e3cef62e4a019d3c95e
treeab8deaaa5fbbd07cacb8e951d36fd9c7568aee97
parentabebfbe2f7315dd3ec9a0c69596a76e32beb5749
filesystem-dax: convert to dax_flush()

Filesystem-DAX flushes caches whenever it writes to the address returned
through dax_direct_access() and when writing back dirty radix entries.
That flushing is only required in the pmem case, so the dax_flush()
helper skips cache management work when the underlying driver does not
specify a flush method.

We still do all the dirty tracking since the radix entry will already be
there for locking purposes. However, the work to clean the entry will be
a nop for some dax drivers.

Cc: Jeff Moyer <jmoyer@redhat.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Matthew Wilcox <mawilcox@microsoft.com>
Cc: Ross Zwisler <ross.zwisler@linux.intel.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
fs/dax.c