OpenZFS 8592 - ZFS channel programs - rollback

Authored by: Brad Lewis <brad.lewis@delphix.com>
Reviewed by: Chris Williamson <chris.williamson@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Ported-by: Don Brady <don.brady@delphix.com>

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
This commit is contained in:
Brad Lewis
2018-02-08 09:20:33 -07:00
committed by Brian Behlendorf
parent 475eca4908
commit af07368986
8 changed files with 177 additions and 16 deletions
+13 -1
View File
@@ -8,7 +8,7 @@
.\" http://www.illumos.org/license/CDDL.
.\"
.\"
.\" Copyright (c) 2016 by Delphix. All Rights Reserved.
.\" Copyright (c) 2016, 2017 by Delphix. All Rights Reserved.
.\"
.Dd January 21, 2016
.Dt ZFS-PROGRAM 8
@@ -361,6 +361,17 @@ dataset (string)
.Bd -ragged -compact -offset "xxxx"
Clone to be promoted.
.Ed
.It Em zfs.sync.rollback(filesystem)
Rollback to the previous snapshot for a dataset.
Returns 0 on successful rollback, or a nonzero error code otherwise.
Rollbacks can be performed on filesystems or zvols, but not on snapshots
or mounted datasets.
EBUSY is returned in the case where the filesystem is mounted.
.Pp
filesystem (string)
.Bd -ragged -compact -offset "xxxx"
Filesystem to rollback.
.Ed
.El
.It Sy zfs.check submodule
For each function in the zfs.sync submodule, there is a corresponding zfs.check
@@ -380,6 +391,7 @@ The available zfs.check functions are:
.Bl -tag -width "xx"
.It Em zfs.check.destroy(dataset, [defer=true|false])
.It Em zfs.check.promote(dataset)
.It Em zfs.check.rollback(filesystem)
.El
.It Sy zfs.list submodule
The zfs.list submodule provides functions for iterating over datasets and