]> git.baikalelectronics.ru Git - kernel.git/commit
ext4: Support for synchronous DAX faults
authorJan Kara <jack@suse.cz>
Wed, 1 Nov 2017 15:36:45 +0000 (16:36 +0100)
committerDan Williams <dan.j.williams@intel.com>
Fri, 3 Nov 2017 13:26:26 +0000 (06:26 -0700)
commit95c296bbee2f78ea980df83eb4a6e14fd1d74e28
treee9b6ff2b1ee0459854e64f3195a7af7571b62196
parentf53606a54050fb9c2120208da02003e2440c37c6
ext4: Support for synchronous DAX faults

We return IOMAP_F_DIRTY flag from ext4_iomap_begin() when asked to
prepare blocks for writing and the inode has some uncommitted metadata
changes. In the fault handler ext4_dax_fault() we then detect this case
(through VM_FAULT_NEEDDSYNC return value) and call helper
dax_finish_sync_fault() to flush metadata changes and insert page table
entry. Note that this will also dirty corresponding radix tree entry
which is what we want - fsync(2) will still provide data integrity
guarantees for applications not using userspace flushing. And
applications using userspace flushing can avoid calling fsync(2) and
thus avoid the performance overhead.

Reviewed-by: Ross Zwisler <ross.zwisler@linux.intel.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
fs/ext4/file.c
fs/ext4/inode.c
fs/jbd2/journal.c
include/linux/jbd2.h