summaryrefslogtreecommitdiff
path: root/fs/dax.c
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2017-05-29 13:07:46 -0700
committerDan Williams <dan.j.williams@intel.com>2017-06-15 14:35:24 -0700
commit6318770a7d43a4166b6a8e3cef62e4a019d3c95e (patch)
treeab8deaaa5fbbd07cacb8e951d36fd9c7568aee97 /fs/dax.c
parentabebfbe2f7315dd3ec9a0c69596a76e32beb5749 (diff)
downloadlwn-6318770a7d43a4166b6a8e3cef62e4a019d3c95e.tar.gz
lwn-6318770a7d43a4166b6a8e3cef62e4a019d3c95e.zip
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>
Diffstat (limited to 'fs/dax.c')
-rw-r--r--fs/dax.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/dax.c b/fs/dax.c
index b459948de427..0933fc460ada 100644
--- a/fs/dax.c
+++ b/fs/dax.c
@@ -784,7 +784,7 @@ static int dax_writeback_one(struct block_device *bdev,
}
dax_mapping_entry_mkclean(mapping, index, pfn_t_to_pfn(pfn));
- wb_cache_pmem(kaddr, size);
+ dax_flush(dax_dev, pgoff, kaddr, size);
/*
* After we have flushed the cache, we can clear the dirty tag. There
* cannot be new dirty data in the pfn after the flush has completed as