summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/fs/fsutil
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2021-03-23 19:03:20 +0000
committergVisor bot <gvisor-bot@google.com>2021-03-23 19:03:20 +0000
commite48ad2ada0357cb8ee9185074aaff7ab44d84631 (patch)
treef8848b871cd5e3a0d07853083e024a231438085c /pkg/sentry/fs/fsutil
parent0fea1c57d9bc63416cc366720b2f53139468352f (diff)
parentacb4c62885629d6d3ee977b93c27282abed0b33f (diff)
Merge release-20210315.0-15-gacb4c6288 (automated)
Diffstat (limited to 'pkg/sentry/fs/fsutil')
-rw-r--r--pkg/sentry/fs/fsutil/fsutil_impl_state_autogen.go18
-rw-r--r--pkg/sentry/fs/fsutil/fsutil_state_autogen.go28
2 files changed, 46 insertions, 0 deletions
diff --git a/pkg/sentry/fs/fsutil/fsutil_impl_state_autogen.go b/pkg/sentry/fs/fsutil/fsutil_impl_state_autogen.go
index cb6b2ca81..b7f95bde7 100644
--- a/pkg/sentry/fs/fsutil/fsutil_impl_state_autogen.go
+++ b/pkg/sentry/fs/fsutil/fsutil_impl_state_autogen.go
@@ -18,6 +18,7 @@ func (s *DirtySet) StateFields() []string {
func (s *DirtySet) beforeSave() {}
+// +checklocksignore
func (s *DirtySet) StateSave(stateSinkObject state.Sink) {
s.beforeSave()
var rootValue *DirtySegmentDataSlices = s.saveRoot()
@@ -26,6 +27,7 @@ func (s *DirtySet) StateSave(stateSinkObject state.Sink) {
func (s *DirtySet) afterLoad() {}
+// +checklocksignore
func (s *DirtySet) StateLoad(stateSourceObject state.Source) {
stateSourceObject.LoadValue(0, new(*DirtySegmentDataSlices), func(y interface{}) { s.loadRoot(y.(*DirtySegmentDataSlices)) })
}
@@ -49,6 +51,7 @@ func (n *Dirtynode) StateFields() []string {
func (n *Dirtynode) beforeSave() {}
+// +checklocksignore
func (n *Dirtynode) StateSave(stateSinkObject state.Sink) {
n.beforeSave()
stateSinkObject.Save(0, &n.nrSegments)
@@ -63,6 +66,7 @@ func (n *Dirtynode) StateSave(stateSinkObject state.Sink) {
func (n *Dirtynode) afterLoad() {}
+// +checklocksignore
func (n *Dirtynode) StateLoad(stateSourceObject state.Source) {
stateSourceObject.Load(0, &n.nrSegments)
stateSourceObject.Load(1, &n.parent)
@@ -88,6 +92,7 @@ func (d *DirtySegmentDataSlices) StateFields() []string {
func (d *DirtySegmentDataSlices) beforeSave() {}
+// +checklocksignore
func (d *DirtySegmentDataSlices) StateSave(stateSinkObject state.Sink) {
d.beforeSave()
stateSinkObject.Save(0, &d.Start)
@@ -97,6 +102,7 @@ func (d *DirtySegmentDataSlices) StateSave(stateSinkObject state.Sink) {
func (d *DirtySegmentDataSlices) afterLoad() {}
+// +checklocksignore
func (d *DirtySegmentDataSlices) StateLoad(stateSourceObject state.Source) {
stateSourceObject.Load(0, &d.Start)
stateSourceObject.Load(1, &d.End)
@@ -115,6 +121,7 @@ func (s *FileRangeSet) StateFields() []string {
func (s *FileRangeSet) beforeSave() {}
+// +checklocksignore
func (s *FileRangeSet) StateSave(stateSinkObject state.Sink) {
s.beforeSave()
var rootValue *FileRangeSegmentDataSlices = s.saveRoot()
@@ -123,6 +130,7 @@ func (s *FileRangeSet) StateSave(stateSinkObject state.Sink) {
func (s *FileRangeSet) afterLoad() {}
+// +checklocksignore
func (s *FileRangeSet) StateLoad(stateSourceObject state.Source) {
stateSourceObject.LoadValue(0, new(*FileRangeSegmentDataSlices), func(y interface{}) { s.loadRoot(y.(*FileRangeSegmentDataSlices)) })
}
@@ -146,6 +154,7 @@ func (n *FileRangenode) StateFields() []string {
func (n *FileRangenode) beforeSave() {}
+// +checklocksignore
func (n *FileRangenode) StateSave(stateSinkObject state.Sink) {
n.beforeSave()
stateSinkObject.Save(0, &n.nrSegments)
@@ -160,6 +169,7 @@ func (n *FileRangenode) StateSave(stateSinkObject state.Sink) {
func (n *FileRangenode) afterLoad() {}
+// +checklocksignore
func (n *FileRangenode) StateLoad(stateSourceObject state.Source) {
stateSourceObject.Load(0, &n.nrSegments)
stateSourceObject.Load(1, &n.parent)
@@ -185,6 +195,7 @@ func (f *FileRangeSegmentDataSlices) StateFields() []string {
func (f *FileRangeSegmentDataSlices) beforeSave() {}
+// +checklocksignore
func (f *FileRangeSegmentDataSlices) StateSave(stateSinkObject state.Sink) {
f.beforeSave()
stateSinkObject.Save(0, &f.Start)
@@ -194,6 +205,7 @@ func (f *FileRangeSegmentDataSlices) StateSave(stateSinkObject state.Sink) {
func (f *FileRangeSegmentDataSlices) afterLoad() {}
+// +checklocksignore
func (f *FileRangeSegmentDataSlices) StateLoad(stateSourceObject state.Source) {
stateSourceObject.Load(0, &f.Start)
stateSourceObject.Load(1, &f.End)
@@ -212,6 +224,7 @@ func (s *FrameRefSet) StateFields() []string {
func (s *FrameRefSet) beforeSave() {}
+// +checklocksignore
func (s *FrameRefSet) StateSave(stateSinkObject state.Sink) {
s.beforeSave()
var rootValue *FrameRefSegmentDataSlices = s.saveRoot()
@@ -220,6 +233,7 @@ func (s *FrameRefSet) StateSave(stateSinkObject state.Sink) {
func (s *FrameRefSet) afterLoad() {}
+// +checklocksignore
func (s *FrameRefSet) StateLoad(stateSourceObject state.Source) {
stateSourceObject.LoadValue(0, new(*FrameRefSegmentDataSlices), func(y interface{}) { s.loadRoot(y.(*FrameRefSegmentDataSlices)) })
}
@@ -243,6 +257,7 @@ func (n *FrameRefnode) StateFields() []string {
func (n *FrameRefnode) beforeSave() {}
+// +checklocksignore
func (n *FrameRefnode) StateSave(stateSinkObject state.Sink) {
n.beforeSave()
stateSinkObject.Save(0, &n.nrSegments)
@@ -257,6 +272,7 @@ func (n *FrameRefnode) StateSave(stateSinkObject state.Sink) {
func (n *FrameRefnode) afterLoad() {}
+// +checklocksignore
func (n *FrameRefnode) StateLoad(stateSourceObject state.Source) {
stateSourceObject.Load(0, &n.nrSegments)
stateSourceObject.Load(1, &n.parent)
@@ -282,6 +298,7 @@ func (f *FrameRefSegmentDataSlices) StateFields() []string {
func (f *FrameRefSegmentDataSlices) beforeSave() {}
+// +checklocksignore
func (f *FrameRefSegmentDataSlices) StateSave(stateSinkObject state.Sink) {
f.beforeSave()
stateSinkObject.Save(0, &f.Start)
@@ -291,6 +308,7 @@ func (f *FrameRefSegmentDataSlices) StateSave(stateSinkObject state.Sink) {
func (f *FrameRefSegmentDataSlices) afterLoad() {}
+// +checklocksignore
func (f *FrameRefSegmentDataSlices) StateLoad(stateSourceObject state.Source) {
stateSourceObject.Load(0, &f.Start)
stateSourceObject.Load(1, &f.End)
diff --git a/pkg/sentry/fs/fsutil/fsutil_state_autogen.go b/pkg/sentry/fs/fsutil/fsutil_state_autogen.go
index 439ab9a65..748eb9272 100644
--- a/pkg/sentry/fs/fsutil/fsutil_state_autogen.go
+++ b/pkg/sentry/fs/fsutil/fsutil_state_autogen.go
@@ -18,6 +18,7 @@ func (d *DirtyInfo) StateFields() []string {
func (d *DirtyInfo) beforeSave() {}
+// +checklocksignore
func (d *DirtyInfo) StateSave(stateSinkObject state.Sink) {
d.beforeSave()
stateSinkObject.Save(0, &d.Keep)
@@ -25,6 +26,7 @@ func (d *DirtyInfo) StateSave(stateSinkObject state.Sink) {
func (d *DirtyInfo) afterLoad() {}
+// +checklocksignore
func (d *DirtyInfo) StateLoad(stateSourceObject state.Source) {
stateSourceObject.Load(0, &d.Keep)
}
@@ -42,6 +44,7 @@ func (sdfo *StaticDirFileOperations) StateFields() []string {
func (sdfo *StaticDirFileOperations) beforeSave() {}
+// +checklocksignore
func (sdfo *StaticDirFileOperations) StateSave(stateSinkObject state.Sink) {
sdfo.beforeSave()
stateSinkObject.Save(0, &sdfo.dentryMap)
@@ -50,6 +53,7 @@ func (sdfo *StaticDirFileOperations) StateSave(stateSinkObject state.Sink) {
func (sdfo *StaticDirFileOperations) afterLoad() {}
+// +checklocksignore
func (sdfo *StaticDirFileOperations) StateLoad(stateSourceObject state.Source) {
stateSourceObject.Load(0, &sdfo.dentryMap)
stateSourceObject.Load(1, &sdfo.dirCursor)
@@ -65,12 +69,14 @@ func (n *NoReadWriteFile) StateFields() []string {
func (n *NoReadWriteFile) beforeSave() {}
+// +checklocksignore
func (n *NoReadWriteFile) StateSave(stateSinkObject state.Sink) {
n.beforeSave()
}
func (n *NoReadWriteFile) afterLoad() {}
+// +checklocksignore
func (n *NoReadWriteFile) StateLoad(stateSourceObject state.Source) {
}
@@ -86,6 +92,7 @@ func (scr *FileStaticContentReader) StateFields() []string {
func (scr *FileStaticContentReader) beforeSave() {}
+// +checklocksignore
func (scr *FileStaticContentReader) StateSave(stateSinkObject state.Sink) {
scr.beforeSave()
stateSinkObject.Save(0, &scr.content)
@@ -93,6 +100,7 @@ func (scr *FileStaticContentReader) StateSave(stateSinkObject state.Sink) {
func (scr *FileStaticContentReader) afterLoad() {}
+// +checklocksignore
func (scr *FileStaticContentReader) StateLoad(stateSourceObject state.Source) {
stateSourceObject.Load(0, &scr.content)
}
@@ -109,11 +117,13 @@ func (f *HostFileMapper) StateFields() []string {
func (f *HostFileMapper) beforeSave() {}
+// +checklocksignore
func (f *HostFileMapper) StateSave(stateSinkObject state.Sink) {
f.beforeSave()
stateSinkObject.Save(0, &f.refs)
}
+// +checklocksignore
func (f *HostFileMapper) StateLoad(stateSourceObject state.Source) {
stateSourceObject.Load(0, &f.refs)
stateSourceObject.AfterLoad(f.afterLoad)
@@ -133,6 +143,7 @@ func (h *HostMappable) StateFields() []string {
func (h *HostMappable) beforeSave() {}
+// +checklocksignore
func (h *HostMappable) StateSave(stateSinkObject state.Sink) {
h.beforeSave()
stateSinkObject.Save(0, &h.hostFileMapper)
@@ -142,6 +153,7 @@ func (h *HostMappable) StateSave(stateSinkObject state.Sink) {
func (h *HostMappable) afterLoad() {}
+// +checklocksignore
func (h *HostMappable) StateLoad(stateSourceObject state.Source) {
stateSourceObject.Load(0, &h.hostFileMapper)
stateSourceObject.Load(1, &h.backingFile)
@@ -160,6 +172,7 @@ func (s *SimpleFileInode) StateFields() []string {
func (s *SimpleFileInode) beforeSave() {}
+// +checklocksignore
func (s *SimpleFileInode) StateSave(stateSinkObject state.Sink) {
s.beforeSave()
stateSinkObject.Save(0, &s.InodeSimpleAttributes)
@@ -167,6 +180,7 @@ func (s *SimpleFileInode) StateSave(stateSinkObject state.Sink) {
func (s *SimpleFileInode) afterLoad() {}
+// +checklocksignore
func (s *SimpleFileInode) StateLoad(stateSourceObject state.Source) {
stateSourceObject.Load(0, &s.InodeSimpleAttributes)
}
@@ -183,6 +197,7 @@ func (n *NoReadWriteFileInode) StateFields() []string {
func (n *NoReadWriteFileInode) beforeSave() {}
+// +checklocksignore
func (n *NoReadWriteFileInode) StateSave(stateSinkObject state.Sink) {
n.beforeSave()
stateSinkObject.Save(0, &n.InodeSimpleAttributes)
@@ -190,6 +205,7 @@ func (n *NoReadWriteFileInode) StateSave(stateSinkObject state.Sink) {
func (n *NoReadWriteFileInode) afterLoad() {}
+// +checklocksignore
func (n *NoReadWriteFileInode) StateLoad(stateSourceObject state.Source) {
stateSourceObject.Load(0, &n.InodeSimpleAttributes)
}
@@ -207,6 +223,7 @@ func (i *InodeSimpleAttributes) StateFields() []string {
func (i *InodeSimpleAttributes) beforeSave() {}
+// +checklocksignore
func (i *InodeSimpleAttributes) StateSave(stateSinkObject state.Sink) {
i.beforeSave()
stateSinkObject.Save(0, &i.fsType)
@@ -215,6 +232,7 @@ func (i *InodeSimpleAttributes) StateSave(stateSinkObject state.Sink) {
func (i *InodeSimpleAttributes) afterLoad() {}
+// +checklocksignore
func (i *InodeSimpleAttributes) StateLoad(stateSourceObject state.Source) {
stateSourceObject.Load(0, &i.fsType)
stateSourceObject.Load(1, &i.unstable)
@@ -232,6 +250,7 @@ func (i *InodeSimpleExtendedAttributes) StateFields() []string {
func (i *InodeSimpleExtendedAttributes) beforeSave() {}
+// +checklocksignore
func (i *InodeSimpleExtendedAttributes) StateSave(stateSinkObject state.Sink) {
i.beforeSave()
stateSinkObject.Save(0, &i.xattrs)
@@ -239,6 +258,7 @@ func (i *InodeSimpleExtendedAttributes) StateSave(stateSinkObject state.Sink) {
func (i *InodeSimpleExtendedAttributes) afterLoad() {}
+// +checklocksignore
func (i *InodeSimpleExtendedAttributes) StateLoad(stateSourceObject state.Source) {
stateSourceObject.Load(0, &i.xattrs)
}
@@ -255,6 +275,7 @@ func (s *staticFile) StateFields() []string {
func (s *staticFile) beforeSave() {}
+// +checklocksignore
func (s *staticFile) StateSave(stateSinkObject state.Sink) {
s.beforeSave()
stateSinkObject.Save(0, &s.FileStaticContentReader)
@@ -262,6 +283,7 @@ func (s *staticFile) StateSave(stateSinkObject state.Sink) {
func (s *staticFile) afterLoad() {}
+// +checklocksignore
func (s *staticFile) StateLoad(stateSourceObject state.Source) {
stateSourceObject.Load(0, &s.FileStaticContentReader)
}
@@ -278,6 +300,7 @@ func (i *InodeStaticFileGetter) StateFields() []string {
func (i *InodeStaticFileGetter) beforeSave() {}
+// +checklocksignore
func (i *InodeStaticFileGetter) StateSave(stateSinkObject state.Sink) {
i.beforeSave()
stateSinkObject.Save(0, &i.Contents)
@@ -285,6 +308,7 @@ func (i *InodeStaticFileGetter) StateSave(stateSinkObject state.Sink) {
func (i *InodeStaticFileGetter) afterLoad() {}
+// +checklocksignore
func (i *InodeStaticFileGetter) StateLoad(stateSourceObject state.Source) {
stateSourceObject.Load(0, &i.Contents)
}
@@ -310,6 +334,7 @@ func (c *CachingInodeOperations) StateFields() []string {
func (c *CachingInodeOperations) beforeSave() {}
+// +checklocksignore
func (c *CachingInodeOperations) StateSave(stateSinkObject state.Sink) {
c.beforeSave()
stateSinkObject.Save(0, &c.backingFile)
@@ -326,6 +351,7 @@ func (c *CachingInodeOperations) StateSave(stateSinkObject state.Sink) {
func (c *CachingInodeOperations) afterLoad() {}
+// +checklocksignore
func (c *CachingInodeOperations) StateLoad(stateSourceObject state.Source) {
stateSourceObject.Load(0, &c.backingFile)
stateSourceObject.Load(1, &c.mfp)
@@ -352,6 +378,7 @@ func (c *CachingInodeOperationsOptions) StateFields() []string {
func (c *CachingInodeOperationsOptions) beforeSave() {}
+// +checklocksignore
func (c *CachingInodeOperationsOptions) StateSave(stateSinkObject state.Sink) {
c.beforeSave()
stateSinkObject.Save(0, &c.ForcePageCache)
@@ -360,6 +387,7 @@ func (c *CachingInodeOperationsOptions) StateSave(stateSinkObject state.Sink) {
func (c *CachingInodeOperationsOptions) afterLoad() {}
+// +checklocksignore
func (c *CachingInodeOperationsOptions) StateLoad(stateSourceObject state.Source) {
stateSourceObject.Load(0, &c.ForcePageCache)
stateSourceObject.Load(1, &c.LimitHostFDTranslation)