mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-25 03:37:45 +03:00
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 <tim@chase2k.com> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #3225
This commit is contained in:
committed by
Brian Behlendorf
parent
74aa2ba259
commit
40d06e3c78
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user