Ross Zwisler 7f6d5b529b dax: move writeback calls into the filesystems
Previously calls to dax_writeback_mapping_range() for all DAX filesystems
(ext2, ext4 & xfs) were centralized in filemap_write_and_wait_range().

dax_writeback_mapping_range() needs a struct block_device, and it used
to get that from inode->i_sb->s_bdev.  This is correct for normal inodes
mounted on ext2, ext4 and XFS filesystems, but is incorrect for DAX raw
block devices and for XFS real-time files.

Instead, call dax_writeback_mapping_range() directly from the filesystem
->writepages function so that it can supply us with a valid block
device.  This also fixes DAX code to properly flush caches in response
to sync(2).

Signed-off-by: Ross Zwisler <ross.zwisler@linux.intel.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Cc: Al Viro <viro@ftp.linux.org.uk>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Dave Chinner <david@fromorbit.com>
Cc: Jens Axboe <axboe@fb.com>
Cc: Matthew Wilcox <matthew.r.wilcox@intel.com>
Cc: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2016-02-27 10:28:52 -08:00
..
2015-12-06 12:46:31 +01:00
2015-11-05 19:34:48 -08:00
2015-06-24 17:49:45 -07:00
2011-07-26 16:49:47 -07:00
2016-01-14 16:00:49 -08:00
2016-01-15 17:56:32 -08:00
2015-09-11 16:42:39 -07:00
2015-09-08 15:35:28 -07:00
2016-01-21 17:20:51 -08:00
2015-11-05 19:34:48 -08:00
2015-12-06 12:46:31 +01:00
2015-09-10 13:29:01 -07:00
2016-01-22 18:04:28 -05:00
2016-02-05 18:10:40 -08:00