]> git.baikalelectronics.ru Git - kernel.git/commit
fs, dax: unify IOMAP_F_DIRTY read vs write handling policy in the dax core
authorDan Williams <dan.j.williams@intel.com>
Tue, 14 Nov 2017 00:38:44 +0000 (16:38 -0800)
committerDan Williams <dan.j.williams@intel.com>
Tue, 14 Nov 2017 00:38:44 +0000 (16:38 -0800)
commit8289dd8fd44243b0b93b581484786e83540dcdd1
tree64ce62bb891f903a5c504a2700823cbd60bb877c
parent297d0bb433af8d637cbe681a44b5109e3ac191ac
fs, dax: unify IOMAP_F_DIRTY read vs write handling policy in the dax core

While reviewing whether MAP_SYNC should strengthen its current guarantee
of syncing writes from the initiating process to also include
third-party readers observing dirty metadata, Dave pointed out that the
check of IOMAP_WRITE is misplaced.

The policy of what to with IOMAP_F_DIRTY should be separated from the
generic filesystem mechanism of reporting dirty metadata. Move this
policy to the fs-dax core to simplify the per-filesystem iomap handlers,
and further centralize code that implements the MAP_SYNC policy. This
otherwise should not change behavior, it just makes it easier to change
behavior in the future.

Reviewed-by: Jan Kara <jack@suse.cz>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Cc: Ross Zwisler <ross.zwisler@linux.intel.com>
Reported-by: Dave Chinner <david@fromorbit.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
fs/dax.c
fs/ext4/inode.c
fs/xfs/xfs_iomap.c