summaryrefslogtreecommitdiffstats
path: root/include/sys
diff options
context:
space:
mode:
authorBrad Lewis <[email protected]>2018-02-08 09:20:33 -0700
committerBrian Behlendorf <[email protected]>2018-02-08 15:29:14 -0800
commitaf0736898669eabe31e47405023c80b9a58e5e6c (patch)
tree05c127fee11e5e639326d68f10216bd9ca228265 /include/sys
parent475eca4908731a87fff1be500ba4d7b011d392e4 (diff)
OpenZFS 8592 - ZFS channel programs - rollback
Authored by: Brad Lewis <[email protected]> Reviewed by: Chris Williamson <[email protected]> Reviewed by: Matthew Ahrens <[email protected]> Approved by: Robert Mustacchi <[email protected]> Ported-by: Don Brady <[email protected]> ZFS channel programs should be able to perform a rollback. OpenZFS-issue: https://www.illumos.org/issues/8592 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/d46b5ed6
Diffstat (limited to 'include/sys')
-rw-r--r--include/sys/dsl_dataset.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/include/sys/dsl_dataset.h b/include/sys/dsl_dataset.h
index 4bf0cb31f..ee822a201 100644
--- a/include/sys/dsl_dataset.h
+++ b/include/sys/dsl_dataset.h
@@ -20,7 +20,7 @@
*/
/*
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2011, 2016 by Delphix. All rights reserved.
+ * Copyright (c) 2011, 2017 by Delphix. All rights reserved.
* Copyright (c) 2013 Steven Hartland. All rights reserved.
* Copyright (c) 2014 Spectra Logic Corporation, All rights reserved.
*/
@@ -245,6 +245,13 @@ typedef struct dsl_dataset_promote_arg {
cred_t *cr;
} dsl_dataset_promote_arg_t;
+typedef struct dsl_dataset_rollback_arg {
+ const char *ddra_fsname;
+ const char *ddra_tosnap;
+ void *ddra_owner;
+ nvlist_t *ddra_result;
+} dsl_dataset_rollback_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.
@@ -394,6 +401,9 @@ void dsl_dataset_set_refreservation_sync_impl(dsl_dataset_t *ds,
void dsl_dataset_zapify(dsl_dataset_t *ds, dmu_tx_t *tx);
boolean_t dsl_dataset_is_zapified(dsl_dataset_t *ds);
boolean_t dsl_dataset_has_resume_receive_state(dsl_dataset_t *ds);
+
+int dsl_dataset_rollback_check(void *arg, dmu_tx_t *tx);
+void dsl_dataset_rollback_sync(void *arg, dmu_tx_t *tx);
int dsl_dataset_rollback(const char *fsname, const char *tosnap, void *owner,
nvlist_t *result);