aboutsummaryrefslogtreecommitdiffstats
path: root/uts/common/fs/zfs/sys/zcp.h
diff options
context:
space:
mode:
Diffstat (limited to 'uts/common/fs/zfs/sys/zcp.h')
-rw-r--r--uts/common/fs/zfs/sys/zcp.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/uts/common/fs/zfs/sys/zcp.h b/uts/common/fs/zfs/sys/zcp.h
index 5713a748f7a0..a6cb575b5b62 100644
--- a/uts/common/fs/zfs/sys/zcp.h
+++ b/uts/common/fs/zfs/sys/zcp.h
@@ -52,6 +52,12 @@ typedef struct zcp_cleanup_handler {
list_node_t zch_node;
} zcp_cleanup_handler_t;
+typedef struct zcp_alloc_arg {
+ boolean_t aa_must_succeed;
+ int64_t aa_alloc_remaining;
+ int64_t aa_alloc_limit;
+} zcp_alloc_arg_t;
+
typedef struct zcp_run_info {
dsl_pool_t *zri_pool;
@@ -94,6 +100,11 @@ typedef struct zcp_run_info {
boolean_t zri_timed_out;
/*
+ * Channel program was canceled by user
+ */
+ boolean_t zri_canceled;
+
+ /*
* Boolean indicating whether or not we are running in syncing
* context.
*/
@@ -104,6 +115,26 @@ typedef struct zcp_run_info {
* triggered in the event of a fatal error.
*/
list_t zri_cleanup_handlers;
+
+ /*
+ * The Lua state context of our channel program.
+ */
+ lua_State *zri_state;
+
+ /*
+ * Lua memory allocator arguments.
+ */
+ zcp_alloc_arg_t *zri_allocargs;
+
+ /*
+ * Contains output values from zcp script or error string.
+ */
+ nvlist_t *zri_outnvl;
+
+ /*
+ * The errno number returned to caller of zcp_eval().
+ */
+ int zri_result;
} zcp_run_info_t;
zcp_run_info_t *zcp_run_info(lua_State *);