diff options
author | Randy Dodgen <dodgen@google.com> | 2017-08-24 15:26:01 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2017-08-24 15:26:01 -0400 |
commit | fd96b8da68d32a9403726db09b229f4b5ac849c7 (patch) | |
tree | d5085d7a2e0433e05456740c80ebaea83261480e /include/linux/time.h | |
parent | 95f1fda47c9d8738f858c3861add7bf0a36a7c0b (diff) | |
download | lwn-fd96b8da68d32a9403726db09b229f4b5ac849c7.tar.gz lwn-fd96b8da68d32a9403726db09b229f4b5ac849c7.zip |
ext4: fix fault handling when mounted with -o dax,ro
If an ext4 filesystem is mounted with both the DAX and read-only
options, executables on that filesystem will fail to start (claiming
'Segmentation fault') due to the fault handler returning
VM_FAULT_SIGBUS.
This is due to the DAX fault handler (see ext4_dax_huge_fault)
attempting to write to the journal when FAULT_FLAG_WRITE is set. This is
the wrong behavior for write faults which will lead to a COW page; in
particular, this fails for readonly mounts.
This change avoids journal writes for faults that are expected to COW.
It might be the case that this could be better handled in
ext4_iomap_begin / ext4_iomap_end (called via iomap_ops inside
dax_iomap_fault). These is some overlap already (e.g. grabbing journal
handles).
Signed-off-by: Randy Dodgen <dodgen@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Jan Kara <jack@suse.cz>
Reviewed-by: Ross Zwisler <ross.zwisler@linux.intel.com>
Diffstat (limited to 'include/linux/time.h')
0 files changed, 0 insertions, 0 deletions