Lines Matching +full:sync +full:- +full:2

1 .\" SPDX-License-Identifier: CDDL-1.0
22 .Nm zfs-program
28 .Op Fl t Ar instruction-limit
29 .Op Fl m Ar memory-limit
54 .Bl -tag -width "-t"
55 .It Fl j , -json
57 When this flag is specified and standard output is empty -
61 Executes a read-only channel program, which runs faster.
62 The program cannot change on-disk state by calling functions from the
63 zfs.sync submodule.
68 .It Fl t Ar instruction-limit
74 .It Fl m Ar memory-limit
95 .Bd -literal -compact -offset indent
98 -- argv == {1="arg1", 2="arg2", ...}
105 .Bd -literal -compact -offset indent
107 -- args == {"foo"="bar", "baz"={...}, ...}
110 Note that because Lua arrays are 1-indexed, arrays passed to Lua from the
128 .Bd -literal -compact -offset indent
129 a = {foo="bar", baz=2}
134 .Bd -literal -compact -offset indent
137 baz: 2
142 If the channel program encounters a fatal error while running, a non-zero exit
169 section below for function-specific details on error return codes.
174 and vice-versa.
182 string -> string
183 number -> int64
184 boolean -> boolean_value
185 nil -> boolean (no value)
186 table -> nvlist
192 string -> no change
193 number -> signed decimal string ("%lld")
194 boolean -> "true" | "false"
200 Lua numbers are represented internally as signed 64-bit integers.
203 The following Lua built-in base library functions are available:
217 built-in submodules are also available.
238 .Dl Sy zfs.sync.destroy Ns Pq \&"rpool@snap"
243 .Dl Sy zfs.sync.destroy Ns Pq {1="rpool@snap", defer=true}
247 .Dl Sy zfs.sync.snapshot Ns {"rpool@snap", defer=true}
263 .Dl errno = Sy zfs.sync.promote Ns Pq dataset
266 .Bd -literal -compact -offset indent
267 .No errno, details = Sy zfs.sync.promote Ns Pq dataset
290 .Bl -tag -width "xx"
295 .Dl dtrace -n 'zfs-dbgmsg{trace(stringof(arg0))}'
297 .Bl -tag -compact -width "property (string)"
310 .Bl -tag -compact -width "property (string)"
326 .Bl -tag -compact -width "property (string)"
344 .Bl -tag -width "xx"
345 .It Sy zfs.sync submodule
346 The sync submodule contains functions that modify the on-disk state.
349 The available sync submodule functions are as follows:
350 .Bl -tag -width "xx"
351 .It Fn zfs.sync.clone snapshot newdataset
371 .Bl -tag -compact -width "newbookmark (string)"
377 .It Sy zfs.sync.destroy Ns Pq Ar dataset , Op Ar defer Ns = Ns Sy true Ns | Ns Sy false
383 .Bl -tag -compact -width "newbookmark (string)"
391 .It Fn zfs.sync.inherit dataset property
400 .Bl -tag -compact -width "newbookmark (string)"
409 .It Fn zfs.sync.promote dataset
415 .Bl -tag -compact -width "newbookmark (string)"
419 .It Fn zfs.sync.rollback filesystem
426 .Bl -tag -compact -width "newbookmark (string)"
430 .It Fn zfs.sync.set_prop dataset property value
435 .Bl -tag -compact -width "newbookmark (string)"
443 .It Fn zfs.sync.snapshot dataset
451 .Bl -tag -compact -width "newbookmark (string)"
455 .It Fn zfs.sync.rename_snapshot dataset oldsnapname newsnapname
460 .Bl -tag -compact -width "newbookmark (string)"
468 .It Fn zfs.sync.bookmark source newbookmark
475 .Bl -tag -compact -width "newbookmark (string)"
484 .Sy zfs.sync
489 .Sy zfs.sync
491 or a non-zero error code if it would fail, along with any other error details.
492 That is, each has the same behavior as the corresponding sync function except
497 .Fn zfs.sync.destroy \&"fs"
503 .Bl -tag -compact -width "xx"
516 .Bd -literal -compact -offset indent
525 .Bl -tag -width "xx"
529 .Bl -tag -compact -width "snapshot (string)"
538 .Bl -tag -compact -width "snapshot (string)"
547 .Bl -tag -compact -width "snapshot (string)"
556 .Bl -tag -compact -width "snapshot (string)"
566 .Bl -tag -compact -width "snapshot (string)"
573 .Bl -tag -compact -width "snapshot (string)"
583 .Bl -tag -compact -width "snapshot (string)"
588 Returns an array of strings, the names of the valid system (non-user defined)
592 .Bl -tag -compact -width "snapshot (string)"
605 .Bd -literal -offset indent
611 zfs.sync.destroy(snap)
613 zfs.sync.destroy(root)
618 .Ss Example 2
622 .Bd -literal -offset indent
631 err = zfs.sync.destroy(snap)
638 err = zfs.sync.destroy(root)
660 .Bd -literal -offset indent
666 zfs.sync.destroy(ds .. "@" .. snap)
671 return zfs.sync.promote(ds)