- Implement dataset/volume clone promote function
This commit is contained in:
parent
07270bcff8
commit
89e00d6218
12
zfs.go
12
zfs.go
|
@ -407,6 +407,18 @@ func (d *Dataset) Rollback(snap *Dataset, force bool) (err error) {
|
|||
return
|
||||
}
|
||||
|
||||
// Promote promotes dataset clone
|
||||
func (d *Dataset) Promote() (err error) {
|
||||
if d.list == nil {
|
||||
err = errors.New(msgDatasetIsNil)
|
||||
return
|
||||
}
|
||||
if errc := C.zfs_promote(d.list.zh); errc != 0 {
|
||||
err = LastError()
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// Rename dataset
|
||||
func (d *Dataset) Rename(newName string, recur,
|
||||
forceUnmount bool) (err error) {
|
||||
|
|
Loading…
Reference in New Issue