summaryrefslogtreecommitdiffstats
path: root/module/zfs/zcp.c
diff options
context:
space:
mode:
authorChris Williamson <[email protected]>2018-02-08 09:24:39 -0700
committerBrian Behlendorf <[email protected]>2018-02-08 15:29:24 -0800
commit234c91c50848fa74bd72efff4e555331a25d9fe1 (patch)
treee93accbb8799995afbc2d3d3714577b1f925471c /module/zfs/zcp.c
parentaf0736898669eabe31e47405023c80b9a58e5e6c (diff)
OpenZFS 8600 - ZFS channel programs - snapshot
Authored by: Chris Williamson <[email protected]> Reviewed by: Matthew Ahrens <[email protected]> Reviewed by: John Kennedy <[email protected]> Reviewed by: Brad Lewis <[email protected]> Approved by: Robert Mustacchi <[email protected]> Ported-by: Don Brady <[email protected]> ZFS channel programs should be able to create snapshots. In addition to the base snapshot functionality, this entails extra logic to handle edge cases which were formerly not possible, such as creating then destroying a snapshot in the same transaction sync. OpenZFS-issue: https://www.illumos.org/issues/8600 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/68089b8b
Diffstat (limited to 'module/zfs/zcp.c')
-rw-r--r--module/zfs/zcp.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/module/zfs/zcp.c b/module/zfs/zcp.c
index 83560309b..1a39330d3 100644
--- a/module/zfs/zcp.c
+++ b/module/zfs/zcp.c
@@ -14,7 +14,7 @@
*/
/*
- * Copyright (c) 2016 by Delphix. All rights reserved.
+ * Copyright (c) 2016, 2017 by Delphix. All rights reserved.
*/
/*
@@ -106,10 +106,15 @@
#define KM_NORMALPRI 0
#endif
+#define ZCP_NVLIST_MAX_DEPTH 20
+
uint64_t zfs_lua_check_instrlimit_interval = 100;
uint64_t zfs_lua_max_instrlimit = ZCP_MAX_INSTRLIMIT;
uint64_t zfs_lua_max_memlimit = ZCP_MAX_MEMLIMIT;
+/*
+ * Forward declarations for mutually recursive functions
+ */
static int zcp_nvpair_value_to_lua(lua_State *, nvpair_t *, char *, int);
static int zcp_lua_to_nvlist_impl(lua_State *, int, nvlist_t *, const char *,
int);
@@ -217,8 +222,6 @@ zcp_cleanup(lua_State *state)
}
}
-#define ZCP_NVLIST_MAX_DEPTH 20
-
/*
* Convert the lua table at the given index on the Lua stack to an nvlist
* and return it.