diff options
author | Tim Chase <[email protected]> | 2015-03-30 22:43:29 -0500 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2015-04-03 11:38:59 -0700 |
commit | 40d06e3c78c23b199dfd9284809e710fab549391 (patch) | |
tree | 77de486d62f5eabf458b251504bf47104b6f1bf1 /module/zfs/zfs_ioctl.c | |
parent | 74aa2ba259e61512bd029c9e8f857f0611a80bbd (diff) |
Mark all ZPL and ioctl functions as PF_FSTRANS
Prevent deadlocks by disabling direct reclaim during all ZPL and ioctl
calls as well as the l2arc and adapt ARC threads.
This obviates the need for MUTEX_FSTRANS so its previous uses and
definition have been eliminated.
Signed-off-by: Tim Chase <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes #3225
Diffstat (limited to 'module/zfs/zfs_ioctl.c')
-rw-r--r-- | module/zfs/zfs_ioctl.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/module/zfs/zfs_ioctl.c b/module/zfs/zfs_ioctl.c index cd7697058..39783e109 100644 --- a/module/zfs/zfs_ioctl.c +++ b/module/zfs/zfs_ioctl.c @@ -5733,6 +5733,7 @@ zfsdev_ioctl(struct file *filp, unsigned cmd, unsigned long arg) const zfs_ioc_vec_t *vec; char *saved_poolname = NULL; nvlist_t *innvl = NULL; + fstrans_cookie_t cookie; vecnum = cmd - ZFS_IOC_FIRST; if (vecnum >= sizeof (zfs_ioc_vec) / sizeof (zfs_ioc_vec[0])) @@ -5827,7 +5828,9 @@ zfsdev_ioctl(struct file *filp, unsigned cmd, unsigned long arg) } outnvl = fnvlist_alloc(); + cookie = spl_fstrans_mark(); error = vec->zvec_func(zc->zc_name, innvl, outnvl); + spl_fstrans_unmark(cookie); if (error == 0 && vec->zvec_allow_log && spa_open(zc->zc_name, &spa, FTAG) == 0) { @@ -5855,7 +5858,9 @@ zfsdev_ioctl(struct file *filp, unsigned cmd, unsigned long arg) nvlist_free(outnvl); } else { + cookie = spl_fstrans_mark(); error = vec->zvec_legacy_func(zc); + spl_fstrans_unmark(cookie); } out: |