// automatically generated by stateify. package gofer import ( "gvisor.dev/gvisor/pkg/state" ) func (i *fifo) StateTypeName() string { return "pkg/sentry/fs/gofer.fifo" } func (i *fifo) StateFields() []string { return []string{ "InodeOperations", "fileIops", } } func (i *fifo) beforeSave() {} func (i *fifo) StateSave(stateSinkObject state.Sink) { i.beforeSave() stateSinkObject.Save(0, &i.InodeOperations) stateSinkObject.Save(1, &i.fileIops) } func (i *fifo) afterLoad() {} func (i *fifo) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &i.InodeOperations) stateSourceObject.Load(1, &i.fileIops) } func (f *fileOperations) StateTypeName() string { return "pkg/sentry/fs/gofer.fileOperations" } func (f *fileOperations) StateFields() []string { return []string{ "inodeOperations", "dirCursor", "flags", } } func (f *fileOperations) beforeSave() {} func (f *fileOperations) StateSave(stateSinkObject state.Sink) { f.beforeSave() stateSinkObject.Save(0, &f.inodeOperations) stateSinkObject.Save(1, &f.dirCursor) stateSinkObject.Save(2, &f.flags) } func (f *fileOperations) StateLoad(stateSourceObject state.Source) { stateSourceObject.LoadWait(0, &f.inodeOperations) stateSourceObject.Load(1, &f.dirCursor) stateSourceObject.LoadWait(2, &f.flags) stateSourceObject.AfterLoad(f.afterLoad) } func (f *filesystem) StateTypeName() string { return "pkg/sentry/fs/gofer.filesystem" } func (f *filesystem) StateFields() []string { return []string{} } func (f *filesystem) beforeSave() {} func (f *filesystem) StateSave(stateSinkObject state.Sink) { f.beforeSave() } func (f *filesystem) afterLoad() {} func (f *filesystem) StateLoad(stateSourceObject state.Source) { } func (i *inodeOperations) StateTypeName() string { return "pkg/sentry/fs/gofer.inodeOperations" } func (i *inodeOperations) StateFields() []string { return []string{ "fileState", "cachingInodeOps", } } func (i *inodeOperations) beforeSave() {} func (i *inodeOperations) StateSave(stateSinkObject state.Sink) { i.beforeSave() stateSinkObject.Save(0, &i.fileState) stateSinkObject.Save(1, &i.cachingInodeOps) } func (i *inodeOperations) afterLoad() {} func (i *inodeOperations) StateLoad(stateSourceObject state.Source) { stateSourceObject.LoadWait(0, &i.fileState) stateSourceObject.Load(1, &i.cachingInodeOps) } func (i *inodeFileState) StateTypeName() string { return "pkg/sentry/fs/gofer.inodeFileState" } func (i *inodeFileState) StateFields() []string { return []string{ "s", "sattr", "loading", "savedUAttr", "hostMappable", } } func (i *inodeFileState) StateSave(stateSinkObject state.Sink) { i.beforeSave() var loadingValue struct{} = i.saveLoading() stateSinkObject.SaveValue(2, loadingValue) stateSinkObject.Save(0, &i.s) stateSinkObject.Save(1, &i.sattr) stateSinkObject.Save(3, &i.savedUAttr) stateSinkObject.Save(4, &i.hostMappable) } func (i *inodeFileState) StateLoad(stateSourceObject state.Source) { stateSourceObject.LoadWait(0, &i.s) stateSourceObject.LoadWait(1, &i.sattr) stateSourceObject.Load(3, &i.savedUAttr) stateSourceObject.Load(4, &i.hostMappable) stateSourceObject.LoadValue(2, new(struct{}), func(y interface{}) { i.loadLoading(y.(struct{})) }) stateSourceObject.AfterLoad(i.afterLoad) } func (l *overrideInfo) StateTypeName() string { return "pkg/sentry/fs/gofer.overrideInfo" } func (l *overrideInfo) StateFields() []string { return []string{ "dirent", "endpoint", "inode", } } func (l *overrideInfo) beforeSave() {} func (l *overrideInfo) StateSave(stateSinkObject state.Sink) { l.beforeSave() stateSinkObject.Save(0, &l.dirent) stateSinkObject.Save(1, &l.endpoint) stateSinkObject.Save(2, &l.inode) } func (l *overrideInfo) afterLoad() {} func (l *overrideInfo) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &l.dirent) stateSourceObject.Load(1, &l.endpoint) stateSourceObject.Load(2, &l.inode) } func (e *overrideMaps) StateTypeName() string { return "pkg/sentry/fs/gofer.overrideMaps" } func (e *overrideMaps) StateFields() []string { return []string{ "pathMap", } } func (e *overrideMaps) beforeSave() {} func (e *overrideMaps) StateSave(stateSinkObject state.Sink) { e.beforeSave() stateSinkObject.Save(0, &e.pathMap) } func (e *overrideMaps) afterLoad() {} func (e *overrideMaps) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &e.pathMap) } func (s *session) StateTypeName() string { return "pkg/sentry/fs/gofer.session" } func (s *session) StateFields() []string { return []string{ "AtomicRefCount", "msize", "version", "cachePolicy", "aname", "superBlockFlags", "limitHostFDTranslation", "overlayfsStaleRead", "connID", "inodeMappings", "mounter", "overrides", } } func (s *session) StateSave(stateSinkObject state.Sink) { s.beforeSave() stateSinkObject.Save(0, &s.AtomicRefCount) stateSinkObject.Save(1, &s.msize) stateSinkObject.Save(2, &s.version) stateSinkObject.Save(3, &s.cachePolicy) stateSinkObject.Save(4, &s.aname) stateSinkObject.Save(5, &s.superBlockFlags) stateSinkObject.Save(6, &s.limitHostFDTranslation) stateSinkObject.Save(7, &s.overlayfsStaleRead) stateSinkObject.Save(8, &s.connID) stateSinkObject.Save(9, &s.inodeMappings) stateSinkObject.Save(10, &s.mounter) stateSinkObject.Save(11, &s.overrides) } func (s *session) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &s.AtomicRefCount) stateSourceObject.LoadWait(1, &s.msize) stateSourceObject.LoadWait(2, &s.version) stateSourceObject.LoadWait(3, &s.cachePolicy) stateSourceObject.LoadWait(4, &s.aname) stateSourceObject.LoadWait(5, &s.superBlockFlags) stateSourceObject.Load(6, &s.limitHostFDTranslation) stateSourceObject.Load(7, &s.overlayfsStaleRead) stateSourceObject.LoadWait(8, &s.connID) stateSourceObject.LoadWait(9, &s.inodeMappings) stateSourceObject.LoadWait(10, &s.mounter) stateSourceObject.LoadWait(11, &s.overrides) stateSourceObject.AfterLoad(s.afterLoad) } func init() { state.Register((*fifo)(nil)) state.Register((*fileOperations)(nil)) state.Register((*filesystem)(nil)) state.Register((*inodeOperations)(nil)) state.Register((*inodeFileState)(nil)) state.Register((*overrideInfo)(nil)) state.Register((*overrideMaps)(nil)) state.Register((*session)(nil)) }