diff options
author | avg <avg@FreeBSD.org> | 2010-10-12 17:04:21 +0000 |
---|---|---|
committer | avg <avg@FreeBSD.org> | 2010-10-12 17:04:21 +0000 |
commit | 3bb689aafadf915d572fd946e9403fd922773fe0 (patch) | |
tree | a0ea7944ba5de78207f3c61517bba52ea84e08b1 /sys/fs/tmpfs/tmpfs_vnops.c | |
parent | 465ea6bc32a124d7427fba6851b9ff75874ba1ab (diff) | |
download | FreeBSD-src-3bb689aafadf915d572fd946e9403fd922773fe0.zip FreeBSD-src-3bb689aafadf915d572fd946e9403fd922773fe0.tar.gz |
zfs + sendfile: do not produce partially valid pages for vnode's tail
Since r212650 and before this change sendfile(2) could produce
a partially valid page for a trailing portion of a ZFS vnode.
vm_fault() always wants to see a fully valid page even if it's the last
page that partially extends beyond vnode's end. Otherwise it calls
vop_getpages() to bring in the page. In the case of ZFS this means
that the data is read from the page into the same page and this breaks
checks in ZFS mappedread() - a thread that set VPO_BUSY on the page in
vm_fault() will get blocked forever waiting for it to be cleared.
Many thanks to Kai and Jeremy for reproducing the issue and providing
important debugging information and help.
Reported by: Kai Gallasch <gallasch@free.de>,
Jeremy Chadwick <freebsd@jdc.parodius.com>
Tested by: Kai Gallasch <gallasch@free.de>,
Jeremy Chadwick <freebsd@jdc.parodius.com>
Reviewed by: kib
MFC after: 3 days
To-Do: apply the same treatment to tmpfs + sendfile
Diffstat (limited to 'sys/fs/tmpfs/tmpfs_vnops.c')
0 files changed, 0 insertions, 0 deletions