1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
|
// automatically generated by stateify.
package gofer
import (
"gvisor.dev/gvisor/pkg/state"
)
func (x *fifo) beforeSave() {}
func (x *fifo) save(m state.Map) {
x.beforeSave()
m.Save("InodeOperations", &x.InodeOperations)
m.Save("fileIops", &x.fileIops)
}
func (x *fifo) afterLoad() {}
func (x *fifo) load(m state.Map) {
m.Load("InodeOperations", &x.InodeOperations)
m.Load("fileIops", &x.fileIops)
}
func (x *fileOperations) beforeSave() {}
func (x *fileOperations) save(m state.Map) {
x.beforeSave()
m.Save("inodeOperations", &x.inodeOperations)
m.Save("dirCursor", &x.dirCursor)
m.Save("flags", &x.flags)
}
func (x *fileOperations) load(m state.Map) {
m.LoadWait("inodeOperations", &x.inodeOperations)
m.Load("dirCursor", &x.dirCursor)
m.LoadWait("flags", &x.flags)
m.AfterLoad(x.afterLoad)
}
func (x *filesystem) beforeSave() {}
func (x *filesystem) save(m state.Map) {
x.beforeSave()
}
func (x *filesystem) afterLoad() {}
func (x *filesystem) load(m state.Map) {
}
func (x *inodeOperations) beforeSave() {}
func (x *inodeOperations) save(m state.Map) {
x.beforeSave()
m.Save("fileState", &x.fileState)
m.Save("cachingInodeOps", &x.cachingInodeOps)
}
func (x *inodeOperations) afterLoad() {}
func (x *inodeOperations) load(m state.Map) {
m.LoadWait("fileState", &x.fileState)
m.Load("cachingInodeOps", &x.cachingInodeOps)
}
func (x *inodeFileState) save(m state.Map) {
x.beforeSave()
var loading struct{} = x.saveLoading()
m.SaveValue("loading", loading)
m.Save("s", &x.s)
m.Save("sattr", &x.sattr)
m.Save("savedUAttr", &x.savedUAttr)
m.Save("hostMappable", &x.hostMappable)
}
func (x *inodeFileState) load(m state.Map) {
m.LoadWait("s", &x.s)
m.LoadWait("sattr", &x.sattr)
m.Load("savedUAttr", &x.savedUAttr)
m.Load("hostMappable", &x.hostMappable)
m.LoadValue("loading", new(struct{}), func(y interface{}) { x.loadLoading(y.(struct{})) })
m.AfterLoad(x.afterLoad)
}
func (x *overrideInfo) beforeSave() {}
func (x *overrideInfo) save(m state.Map) {
x.beforeSave()
m.Save("dirent", &x.dirent)
m.Save("endpoint", &x.endpoint)
m.Save("inode", &x.inode)
}
func (x *overrideInfo) afterLoad() {}
func (x *overrideInfo) load(m state.Map) {
m.Load("dirent", &x.dirent)
m.Load("endpoint", &x.endpoint)
m.Load("inode", &x.inode)
}
func (x *overrideMaps) beforeSave() {}
func (x *overrideMaps) save(m state.Map) {
x.beforeSave()
m.Save("pathMap", &x.pathMap)
}
func (x *overrideMaps) afterLoad() {}
func (x *overrideMaps) load(m state.Map) {
m.Load("pathMap", &x.pathMap)
}
func (x *session) save(m state.Map) {
x.beforeSave()
m.Save("AtomicRefCount", &x.AtomicRefCount)
m.Save("msize", &x.msize)
m.Save("version", &x.version)
m.Save("cachePolicy", &x.cachePolicy)
m.Save("aname", &x.aname)
m.Save("superBlockFlags", &x.superBlockFlags)
m.Save("limitHostFDTranslation", &x.limitHostFDTranslation)
m.Save("overlayfsStaleRead", &x.overlayfsStaleRead)
m.Save("connID", &x.connID)
m.Save("inodeMappings", &x.inodeMappings)
m.Save("mounter", &x.mounter)
m.Save("overrides", &x.overrides)
}
func (x *session) load(m state.Map) {
m.Load("AtomicRefCount", &x.AtomicRefCount)
m.LoadWait("msize", &x.msize)
m.LoadWait("version", &x.version)
m.LoadWait("cachePolicy", &x.cachePolicy)
m.LoadWait("aname", &x.aname)
m.LoadWait("superBlockFlags", &x.superBlockFlags)
m.Load("limitHostFDTranslation", &x.limitHostFDTranslation)
m.Load("overlayfsStaleRead", &x.overlayfsStaleRead)
m.LoadWait("connID", &x.connID)
m.LoadWait("inodeMappings", &x.inodeMappings)
m.LoadWait("mounter", &x.mounter)
m.LoadWait("overrides", &x.overrides)
m.AfterLoad(x.afterLoad)
}
func init() {
state.Register("gofer.fifo", (*fifo)(nil), state.Fns{Save: (*fifo).save, Load: (*fifo).load})
state.Register("gofer.fileOperations", (*fileOperations)(nil), state.Fns{Save: (*fileOperations).save, Load: (*fileOperations).load})
state.Register("gofer.filesystem", (*filesystem)(nil), state.Fns{Save: (*filesystem).save, Load: (*filesystem).load})
state.Register("gofer.inodeOperations", (*inodeOperations)(nil), state.Fns{Save: (*inodeOperations).save, Load: (*inodeOperations).load})
state.Register("gofer.inodeFileState", (*inodeFileState)(nil), state.Fns{Save: (*inodeFileState).save, Load: (*inodeFileState).load})
state.Register("gofer.overrideInfo", (*overrideInfo)(nil), state.Fns{Save: (*overrideInfo).save, Load: (*overrideInfo).load})
state.Register("gofer.overrideMaps", (*overrideMaps)(nil), state.Fns{Save: (*overrideMaps).save, Load: (*overrideMaps).load})
state.Register("gofer.session", (*session)(nil), state.Fns{Save: (*session).save, Load: (*session).load})
}
|