diff options
author | Mark Johnston <markj@FreeBSD.org> | 2020-05-20 18:29:23 +0000 |
---|---|---|
committer | Mark Johnston <markj@FreeBSD.org> | 2020-05-20 18:29:23 +0000 |
commit | 66b415fb8f9a7bd9f01d063ecebc2c74cfcb10be (patch) | |
tree | 40a6d81513612f203242b1f00f646665fe5b25e4 /share/mk/bsd.prog.mk | |
parent | 9bf12bb91d729d827ca0dddf6885d4b3e94e07d3 (diff) | |
download | src-66b415fb8f9a7bd9f01d063ecebc2c74cfcb10be.tar.gz src-66b415fb8f9a7bd9f01d063ecebc2c74cfcb10be.zip |
Don't block on the range lock in zfs_getpages().
After r358443 the vnode object lock no longer synchronizes concurrent
zfs_getpages() and zfs_write() (which must update vnode pages to
maintain coherence). This created a potential deadlock between ZFS
range locks and VM page busy locks: a fault on a mapped file will cause
the fault page to be busied, after which zfs_getpages() locks a range
around the file offset in order to map adjacent, resident pages;
zfs_write() locks the range first, and then must busy vnode pages when
synchronizing.
Solve this by adding a non-blocking mode for ZFS range locks, and using
it in zfs_getpages(). If zfs_getpages() fails to acquire the range
lock, only the fault page will be populated.
Reported by: bdrewery
Reviewed by: avg
Tested by: pho
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D24839
Notes
Notes:
svn path=/head/; revision=361287
Diffstat (limited to 'share/mk/bsd.prog.mk')
0 files changed, 0 insertions, 0 deletions