src/vmm/disksnap.bend checks
raw source on the hub · import 0x797e6e88f253acc21022638860fd49ed/src/vmm/disksnap.bend as Disksnap
4 imports
import Base import ../lib/bytes.bend as B import ./snapfile.bend as Sf import ../disk/access.bend as Ac
Types
type DiskAt source · line 35 · raw
Data
A writable disk and its place in the --disk list.
DiskAt@i:U32 -> @path:String -> DiskAt
type Step source · line 94 · raw
Data
What the host does, step by step.
DClone@from:String -> @to:String -> Step
DRename@from:String -> @to:String -> Step
DRemove@path:String -> Step
type ArgsAt source · line 178 · raw
Data
NUL-separated arguments: the one being read (reversed) and those done (reversed).
ArgsAt@cur:List<&2, U32> -> @done:List<&2, String> -> ArgsAt
Definitions
def Dsnap.flag source · line 27 · raw
String
def Dsnap.copy_fallback source · line 31 · raw
Bool
When the file system cannot clone, the host copies the image.
def Dsnap.keep source · line 38 · raw
@skip:Bool -> @d:DiskAt -> @more:List<&1, DiskAt> -> List<&1, DiskAt>
def Dsnap.writable.go source · line 45 · raw
@specs:List<&2, String> -> @+i:U32 -> List<&1, DiskAt>
def Dsnap.writable source · line 53 · raw
@+spec:String -> List<&1, DiskAt>
The writable disks of a --disk value ("a.img,b.img:ro").
def Dsnap.folder source · line 59 · raw
@+path:String -> Bool
A snapshot folder (snapshot DIR/, src/vmm/snapdir.bend): its memory is
DIR/memory and its copies DIR/disk<i>, tagged "dir" (the folder is
written whole, then renamed: no GEN is needed).
def Dsnap.folder_gen source · line 62 · raw
String
def Dsnap.copy source · line 65 · raw
@+snap:String -> @+gen:String -> @+i:U32 -> String
def Dsnap.tmp source · line 70 · raw
@+path:String -> String
def Dsnap.tagged source · line 74 · raw
@args:List<&1, String> -> @+gen:String -> List<&1, String>
The saved command line, tagged with the copies' GEN.
def Dsnap.gen_of.go source · line 79 · raw
@args:List<&1, String> -> @+found:String -> String
The GEN a saved command line is tagged with ("" when none; the last tag wins).
def Dsnap.gen_of source · line 90 · raw
@args:List<&1, String> -> String
def Dsnap.save.go source · line 99 · raw
@ds:List<&1, DiskAt> -> @+snap:String -> @+gen:String -> List<&1, Step>
def Dsnap.save source · line 109 · raw
@+snap:String -> @+gen:String -> @ds:List<&1, DiskAt> -> List<&1, Step>
1: each writable disk cloned to its copy's temporary name.
def Dsnap.place.go source · line 112 · raw
@ds:List<&1, DiskAt> -> @+snap:String -> @+gen:String -> List<&1, Step>
def Dsnap.place source · line 123 · raw
@+snap:String -> @+gen:String -> @ds:List<&1, DiskAt> -> List<&1, Step>
3: the copies renamed into place (before the snapshot itself).
def Dsnap.drop.go source · line 126 · raw
@ds:List<&1, DiskAt> -> @+snap:String -> @+old:String -> List<&1, Step>
def Dsnap.drop source · line 137 · raw
@+snap:String -> @+old:String -> @+gen:String -> @ds:List<&1, DiskAt> -> List<&1, Step>
4: the copies of the snapshot SNAP held before (tagged old, with its own disks), unless they are this one's.
def Dsnap.restore.go source · line 140 · raw
@ds:List<&1, DiskAt> -> @+snap:String -> @+gen:String -> List<&1, Step>
def Dsnap.restore source · line 151 · raw
@+snap:String -> @+gen:String -> @ds:List<&1, DiskAt> -> List<&1, Step>
Restoring SNAP tagged gen: each disk set back from its copy (none when untagged).
def Dsnap.same source · line 156 · raw
@xs:List<&2, U32> -> @ys:List<&2, U32> -> Bool
Reading an existing snapshot's saved command line (to find its GEN): the 40-byte header (src/vmm/snapfile.bend) says where it is and how long.
def Dsnap.args_len source · line 165 · raw
@+head:List<&2, U32> -> U32
def Dsnap.chars source · line 169 · raw
@bs:List<&2, U32> -> String
def Dsnap.args.byte source · line 181 · raw
@nul:Bool -> @+b:U32 -> @+st:ArgsAt -> ArgsAt
def Dsnap.args.go source · line 188 · raw
@bs:List<&2, U32> -> @+st:ArgsAt -> ArgsAt
def Dsnap.list1 source · line 195 · raw
@xs:List<&2, String> -> @acc:List<&1, String> -> List<&1, String>
def Dsnap.args.end source · line 202 · raw
@+st:ArgsAt -> List<&1, String>
def Dsnap.args source · line 207 · raw
@+bs:List<&2, U32> -> List<&1, String>
def Dsnap.unsave.go source · line 211 · raw
@ds:List<&1, DiskAt> -> @+snap:String -> @+gen:String -> List<&1, Step>
A snapshot that failed: its copies' temporary files removed.
def Dsnap.unsave source · line 220 · raw
@+snap:String -> @+gen:String -> @ds:List<&1, DiskAt> -> List<&1, Step>