summaryrefslogtreecommitdiffstats
path: root/fs/orangefs/protocol.h
diff options
context:
space:
mode:
authorMartin Brandenburg <martin@omnibond.com>2018-04-03 18:27:12 +0200
committerMike Marshall <hubcap@omnibond.com>2018-04-04 03:55:27 +0200
commita5135eeab2e5ca1b94f34dcb772cb30f9f390efc (patch)
treeb0dfd6a088635db87a807a8dbecdce12e93aaca8 /fs/orangefs/protocol.h
parentorangefs: open code short single-use functions (diff)
downloadlinux-a5135eeab2e5ca1b94f34dcb772cb30f9f390efc.tar.xz
linux-a5135eeab2e5ca1b94f34dcb772cb30f9f390efc.zip
orangefs: implement vm_ops->fault
Must retrieve size before running filemap_fault so the kernel has an up-to-date size. This should have been caught by xfstests generic/246, but it was masked by orangefs_new_inode, which set i_size to PAGE_SIZE. When nothing caused a getattr prior to a pagefault, i_size was still PAGE_SIZE. Since xfstests only read 10 bytes, it did not catch this bug. When orangefs_new_inode was modified to perform a getattr instead, i_size was set to zero, as it was a newly created file. Then orangefs_file_write_iter did NOT set i_size. Instead it invalidated the attribute cache, which should have caused the next caller to retrieve i_size. But the fault handler did not know it was supposed to retrieve i_size. So during xfstests, i_size was still zero, and filemap_fault returned VM_FAULT_SIGBUS. Fixes xfstests generic/452. Signed-off-by: Martin Brandenburg <martin@omnibond.com> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
Diffstat (limited to 'fs/orangefs/protocol.h')
0 files changed, 0 insertions, 0 deletions