diff options
author | Andriy Gapon <avg@FreeBSD.org> | 2019-10-16 06:44:37 +0000 |
---|---|---|
committer | Andriy Gapon <avg@FreeBSD.org> | 2019-10-16 06:44:37 +0000 |
commit | 35b885b060938f1f618e83e93a871548e64005c4 (patch) | |
tree | c66f243d0d88d56db7c802eb8b943ccd352865ac /uts/common/fs/zfs/zfs_ioctl.c | |
parent | 66c1f9ba9cf0a53ae881ffbcd3a921ceed60d338 (diff) | |
download | src-35b885b060938f1f618e83e93a871548e64005c4.tar.gz src-35b885b060938f1f618e83e93a871548e64005c4.zip |
9425 allow channel programs to be stopped via signals
illumos/illumos-gate@d0cb1fb92629bc0283c88d4719df7285c1612700
https://github.com/illumos/illumos-gate/commit/d0cb1fb92629bc0283c88d4719df7285c1612700
https://www.illumos.org/issues/9425
Problem Statement
ZFS Channel program scripts currently require a timeout, so that hung
or long- running scripts return a timeout error instead of causing ZFS
to get wedged. This limit can currently be set up to 100 million Lua
instructions. Even with a limit in place, it would be desirable to
have a sys admin (support engineer) be able to cancel a script that is
taking a long time.
Proposed Solution
Make it possible to abort a channel program by sending an interrupt
signal.In the underlying txg_wait_sync function, switch the cv_wait to
a cv_wait_sig to catch the signal. Once a signal is encountered, the
dsl_sync_task function can install a Lua hook that will get called
before the Lua interpreter executes a new line of code. The
dsl_sync_task can resume with a standard txg_wait_sync call and wait
for the txg to complete. Meanwhile, the hook will abort the script and
indicate that the channel program was canceled. The kernel returns a
EINTR to indicate that the channel program run was canceled.
Author: Don Brady <don.brady@delphix.com>
Notes
Notes:
svn path=/vendor-sys/illumos/dist/; revision=353617
Diffstat (limited to 'uts/common/fs/zfs/zfs_ioctl.c')
-rw-r--r-- | uts/common/fs/zfs/zfs_ioctl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/uts/common/fs/zfs/zfs_ioctl.c b/uts/common/fs/zfs/zfs_ioctl.c index b85431ca6e19..a5d163481325 100644 --- a/uts/common/fs/zfs/zfs_ioctl.c +++ b/uts/common/fs/zfs/zfs_ioctl.c @@ -6347,7 +6347,7 @@ zfsdev_ioctl(dev_t dev, int cmd, intptr_t arg, int flag, cred_t *cr, int *rvalp) error = vec->zvec_func(zc->zc_name, innvl, outnvl); /* - * Some commands can partially execute, modfiy state, and still + * Some commands can partially execute, modify state, and still * return an error. In these cases, attempt to record what * was modified. */ |