aboutsummaryrefslogtreecommitdiffstats
path: root/include/sys
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 /include/sys
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 'include/sys')
-rw-r--r--include/sys/dsl_dataset.h9
-rw-r--r--include/sys/zcp.h4
2 files changed, 10 insertions, 3 deletions
diff --git a/include/sys/dsl_dataset.h b/include/sys/dsl_dataset.h
index ee822a201..0030fca24 100644
--- a/include/sys/dsl_dataset.h
+++ b/include/sys/dsl_dataset.h
@@ -252,6 +252,13 @@ typedef struct dsl_dataset_rollback_arg {
nvlist_t *ddra_result;
} dsl_dataset_rollback_arg_t;
+typedef struct dsl_dataset_snapshot_arg {
+ nvlist_t *ddsa_snaps;
+ nvlist_t *ddsa_props;
+ nvlist_t *ddsa_errors;
+ cred_t *ddsa_cr;
+} dsl_dataset_snapshot_arg_t;
+
/*
* The max length of a temporary tag prefix is the number of hex digits
* required to express UINT64_MAX plus one for the hyphen.
@@ -296,6 +303,8 @@ uint64_t dsl_dataset_create_sync(dsl_dir_t *pds, const char *lastname,
struct dsl_crypto_params *, dmu_tx_t *);
uint64_t dsl_dataset_create_sync_dd(dsl_dir_t *dd, dsl_dataset_t *origin,
struct dsl_crypto_params *dcp, uint64_t flags, dmu_tx_t *tx);
+void dsl_dataset_snapshot_sync(void *arg, dmu_tx_t *tx);
+int dsl_dataset_snapshot_check(void *arg, dmu_tx_t *tx);
int dsl_dataset_snapshot(nvlist_t *snaps, nvlist_t *props, nvlist_t *errors);
void dsl_dataset_promote_sync(void *arg, dmu_tx_t *tx);
int dsl_dataset_promote_check(void *arg, dmu_tx_t *tx);
diff --git a/include/sys/zcp.h b/include/sys/zcp.h
index ca9719ecf..df13bf230 100644
--- a/include/sys/zcp.h
+++ b/include/sys/zcp.h
@@ -14,7 +14,7 @@
*/
/*
- * Copyright (c) 2016 by Delphix. All rights reserved.
+ * Copyright (c) 2016, 2017 by Delphix. All rights reserved.
*/
#ifndef _SYS_ZCP_H
@@ -137,8 +137,6 @@ typedef struct zcp_lib_info {
const zcp_arg_t kwargs[2];
} zcp_lib_info_t;
-int zcp_nvlist_to_lua(lua_State *, nvlist_t *, char *, int);
-
#ifdef __cplusplus
}
#endif