mirror_zfs/module/os/freebsd/zfs
Mark Johnston cd32b4f5b7 Fix a deadlock in the FreeBSD getpages VOP
FreeBSD has a per-page "busy" lock which is held when handling a page
fault on a mapped file.  This lock is also acquired when copying data
from the DMU to the page cache in zfs_write().  File range locks are
also acquired in both of these paths, in the opposite order with respect
to the busy lock.

In the getpages VOP, the range lock is only used to determine the extent
of optional read-ahead and read-behind operations.  To resolve the lock
order reversal, modify the getpages VOP to avoid blocking on the range
lock.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Ryan Moeller <ryan@ixsystems.com>
Signed-off-by: Mark Johnston <markj@FreeBSD.org>
Closes #10519
2020-07-06 11:53:57 -07:00
..
abd_os.c Add abd_cache_reap_now for abd_chunk_cache users 2020-06-17 21:44:13 -07:00
arc_os.c freebsd: changes necessary to coexist with dtrace in tree 2020-07-01 09:10:08 -07:00
crypto_os.c Fix crypto build on FreeBSD HEAD 2020-05-30 12:54:57 -07:00
dmu_os.c Use new FreeBSD API to largely eliminate object locking 2020-04-17 09:30:26 -07:00
hkdf.c Add FreeBSD support to OpenZFS 2020-04-14 11:36:28 -07:00
kmod_core.c Add prototypes 2020-06-18 12:21:32 -07:00
spa_os.c Add prototypes 2020-06-18 12:21:32 -07:00
spa_stats.c Add FreeBSD support to OpenZFS 2020-04-14 11:36:28 -07:00
sysctl_os.c freebsd: changes necessary to coexist with dtrace in tree 2020-07-01 09:10:08 -07:00
vdev_file.c freebsd: changes necessary to coexist with dtrace in tree 2020-07-01 09:10:08 -07:00
vdev_geom.c freebsd: changes necessary to coexist with dtrace in tree 2020-07-01 09:10:08 -07:00
vdev_label_os.c Add support for boot environment data to be stored in the label 2020-05-07 09:36:33 -07:00
zfs_acl.c Mark functions as static 2020-06-18 12:20:38 -07:00
zfs_ctldir.c Mark functions as static 2020-06-18 12:20:38 -07:00
zfs_debug.c Add FreeBSD support to OpenZFS 2020-04-14 11:36:28 -07:00
zfs_dir.c Fix typos 2020-06-09 21:24:09 -07:00
zfs_file_os.c Add FreeBSD support to OpenZFS 2020-04-14 11:36:28 -07:00
zfs_fuid_os.c Add FreeBSD support to OpenZFS 2020-04-14 11:36:28 -07:00
zfs_ioctl_os.c Remove redundant includes 2020-06-08 09:57:36 -07:00
zfs_onexit_os.c Add FreeBSD support to OpenZFS 2020-04-14 11:36:28 -07:00
zfs_vfsops.c Fix copy-paste error breaking FreeBSD head 2020-06-19 15:12:34 -07:00
zfs_vnops.c Fix a deadlock in the FreeBSD getpages VOP 2020-07-06 11:53:57 -07:00
zfs_znode.c Mark functions as static 2020-06-18 12:20:38 -07:00
zio_crypt.c Fix typos 2020-06-09 21:24:09 -07:00
zvol_os.c Connect dataset_kstats for FreeBSD 2020-06-05 17:17:02 -07:00