// automatically generated by stateify.

package gofer

import (
	"context"

	"gvisor.dev/gvisor/pkg/state"
)

func (l *dentryList) StateTypeName() string {
	return "pkg/sentry/fsimpl/gofer.dentryList"
}

func (l *dentryList) StateFields() []string {
	return []string{
		"head",
		"tail",
	}
}

func (l *dentryList) beforeSave() {}

// +checklocksignore
func (l *dentryList) StateSave(stateSinkObject state.Sink) {
	l.beforeSave()
	stateSinkObject.Save(0, &l.head)
	stateSinkObject.Save(1, &l.tail)
}

func (l *dentryList) afterLoad(context.Context) {}

// +checklocksignore
func (l *dentryList) StateLoad(ctx context.Context, stateSourceObject state.Source) {
	stateSourceObject.Load(0, &l.head)
	stateSourceObject.Load(1, &l.tail)
}

func (e *dentryEntry) StateTypeName() string {
	return "pkg/sentry/fsimpl/gofer.dentryEntry"
}

func (e *dentryEntry) StateFields() []string {
	return []string{
		"next",
		"prev",
	}
}

func (e *dentryEntry) beforeSave() {}

// +checklocksignore
func (e *dentryEntry) StateSave(stateSinkObject state.Sink) {
	e.beforeSave()
	stateSinkObject.Save(0, &e.next)
	stateSinkObject.Save(1, &e.prev)
}

func (e *dentryEntry) afterLoad(context.Context) {}

// +checklocksignore
func (e *dentryEntry) StateLoad(ctx context.Context, stateSourceObject state.Source) {
	stateSourceObject.Load(0, &e.next)
	stateSourceObject.Load(1, &e.prev)
}

func (i *directfsInode) StateTypeName() string {
	return "pkg/sentry/fsimpl/gofer.directfsInode"
}

func (i *directfsInode) StateFields() []string {
	return []string{
		"inode",
		"controlFD",
	}
}

func (i *directfsInode) beforeSave() {}

// +checklocksignore
func (i *directfsInode) StateSave(stateSinkObject state.Sink) {
	i.beforeSave()
	stateSinkObject.Save(0, &i.inode)
	stateSinkObject.Save(1, &i.controlFD)
}

// +checklocksignore
func (i *directfsInode) StateLoad(ctx context.Context, stateSourceObject state.Source) {
	stateSourceObject.Load(0, &i.inode)
	stateSourceObject.Load(1, &i.controlFD)
	stateSourceObject.AfterLoad(func() { i.afterLoad(ctx) })
}

func (fd *directoryFD) StateTypeName() string {
	return "pkg/sentry/fsimpl/gofer.directoryFD"
}

func (fd *directoryFD) StateFields() []string {
	return []string{
		"fileDescription",
		"DirectoryFileDescriptionDefaultImpl",
		"off",
		"dirents",
	}
}

func (fd *directoryFD) beforeSave() {}

// +checklocksignore
func (fd *directoryFD) StateSave(stateSinkObject state.Sink) {
	fd.beforeSave()
	stateSinkObject.Save(0, &fd.fileDescription)
	stateSinkObject.Save(1, &fd.DirectoryFileDescriptionDefaultImpl)
	stateSinkObject.Save(2, &fd.off)
	stateSinkObject.Save(3, &fd.dirents)
}

func (fd *directoryFD) afterLoad(context.Context) {}

// +checklocksignore
func (fd *directoryFD) StateLoad(ctx context.Context, stateSourceObject state.Source) {
	stateSourceObject.Load(0, &fd.fileDescription)
	stateSourceObject.Load(1, &fd.DirectoryFileDescriptionDefaultImpl)
	stateSourceObject.Load(2, &fd.off)
	stateSourceObject.Load(3, &fd.dirents)
}

func (cache *stringFixedCache) StateTypeName() string {
	return "pkg/sentry/fsimpl/gofer.stringFixedCache"
}

func (cache *stringFixedCache) StateFields() []string {
	return []string{
		"namesList",
		"size",
	}
}

func (cache *stringFixedCache) beforeSave() {}

// +checklocksignore
func (cache *stringFixedCache) StateSave(stateSinkObject state.Sink) {
	cache.beforeSave()
	stateSinkObject.Save(0, &cache.namesList)
	stateSinkObject.Save(1, &cache.size)
}

func (cache *stringFixedCache) afterLoad(context.Context) {}

// +checklocksignore
func (cache *stringFixedCache) StateLoad(ctx context.Context, stateSourceObject state.Source) {
	stateSourceObject.Load(0, &cache.namesList)
	stateSourceObject.Load(1, &cache.size)
}

func (d *dentryCache) StateTypeName() string {
	return "pkg/sentry/fsimpl/gofer.dentryCache"
}

func (d *dentryCache) StateFields() []string {
	return []string{
		"maxCachedDentries",
		"dentries",
		"dentriesLen",
	}
}

func (d *dentryCache) beforeSave() {}

// +checklocksignore
func (d *dentryCache) StateSave(stateSinkObject state.Sink) {
	d.beforeSave()
	stateSinkObject.Save(0, &d.maxCachedDentries)
	stateSinkObject.Save(1, &d.dentries)
	stateSinkObject.Save(2, &d.dentriesLen)
}

func (d *dentryCache) afterLoad(context.Context) {}

// +checklocksignore
func (d *dentryCache) StateLoad(ctx context.Context, stateSourceObject state.Source) {
	stateSourceObject.Load(0, &d.maxCachedDentries)
	stateSourceObject.Load(1, &d.dentries)
	stateSourceObject.Load(2, &d.dentriesLen)
}

func (fstype *FilesystemType) StateTypeName() string {
	return "pkg/sentry/fsimpl/gofer.FilesystemType"
}

func (fstype *FilesystemType) StateFields() []string {
	return []string{}
}

func (fstype *FilesystemType) beforeSave() {}

// +checklocksignore
func (fstype *FilesystemType) StateSave(stateSinkObject state.Sink) {
	fstype.beforeSave()
}

func (fstype *FilesystemType) afterLoad(context.Context) {}

// +checklocksignore
func (fstype *FilesystemType) StateLoad(ctx context.Context, stateSourceObject state.Source) {
}

func (fs *filesystem) StateTypeName() string {
	return "pkg/sentry/fsimpl/gofer.filesystem"
}

func (fs *filesystem) StateFields() []string {
	return []string{
		"vfsfs",
		"opts",
		"iopts",
		"clock",
		"devMinor",
		"root",
		"dentryCache",
		"syncableDentries",
		"specialFileFDs",
		"lastIno",
		"savedDentryRW",
		"savedDeletedOpenDentries",
		"released",
	}
}

func (fs *filesystem) beforeSave() {}

// +checklocksignore
func (fs *filesystem) StateSave(stateSinkObject state.Sink) {
	fs.beforeSave()
	stateSinkObject.Save(0, &fs.vfsfs)
	stateSinkObject.Save(1, &fs.opts)
	stateSinkObject.Save(2, &fs.iopts)
	stateSinkObject.Save(3, &fs.clock)
	stateSinkObject.Save(4, &fs.devMinor)
	stateSinkObject.Save(5, &fs.root)
	stateSinkObject.Save(6, &fs.dentryCache)
	stateSinkObject.Save(7, &fs.syncableDentries)
	stateSinkObject.Save(8, &fs.specialFileFDs)
	stateSinkObject.Save(9, &fs.lastIno)
	stateSinkObject.Save(10, &fs.savedDentryRW)
	stateSinkObject.Save(11, &fs.savedDeletedOpenDentries)
	stateSinkObject.Save(12, &fs.released)
}

// +checklocksignore
func (fs *filesystem) StateLoad(ctx context.Context, stateSourceObject state.Source) {
	stateSourceObject.Load(0, &fs.vfsfs)
	stateSourceObject.Load(1, &fs.opts)
	stateSourceObject.Load(2, &fs.iopts)
	stateSourceObject.Load(3, &fs.clock)
	stateSourceObject.Load(4, &fs.devMinor)
	stateSourceObject.Load(5, &fs.root)
	stateSourceObject.Load(6, &fs.dentryCache)
	stateSourceObject.Load(7, &fs.syncableDentries)
	stateSourceObject.Load(8, &fs.specialFileFDs)
	stateSourceObject.Load(9, &fs.lastIno)
	stateSourceObject.Load(10, &fs.savedDentryRW)
	stateSourceObject.Load(11, &fs.savedDeletedOpenDentries)
	stateSourceObject.Load(12, &fs.released)
	stateSourceObject.AfterLoad(func() { fs.afterLoad(ctx) })
}

func (f *filesystemOptions) StateTypeName() string {
	return "pkg/sentry/fsimpl/gofer.filesystemOptions"
}

func (f *filesystemOptions) StateFields() []string {
	return []string{
		"fd",
		"aname",
		"interop",
		"dfltuid",
		"dfltgid",
		"dcache",
		"forcePageCache",
		"limitHostFDTranslation",
		"overlayfsStaleRead",
		"regularFilesUseSpecialFileFD",
		"disableFifoOpen",
		"directfs",
	}
}

func (f *filesystemOptions) beforeSave() {}

// +checklocksignore
func (f *filesystemOptions) StateSave(stateSinkObject state.Sink) {
	f.beforeSave()
	stateSinkObject.Save(0, &f.fd)
	stateSinkObject.Save(1, &f.aname)
	stateSinkObject.Save(2, &f.interop)
	stateSinkObject.Save(3, &f.dfltuid)
	stateSinkObject.Save(4, &f.dfltgid)
	stateSinkObject.Save(5, &f.dcache)
	stateSinkObject.Save(6, &f.forcePageCache)
	stateSinkObject.Save(7, &f.limitHostFDTranslation)
	stateSinkObject.Save(8, &f.overlayfsStaleRead)
	stateSinkObject.Save(9, &f.regularFilesUseSpecialFileFD)
	stateSinkObject.Save(10, &f.disableFifoOpen)
	stateSinkObject.Save(11, &f.directfs)
}

func (f *filesystemOptions) afterLoad(context.Context) {}

// +checklocksignore
func (f *filesystemOptions) StateLoad(ctx context.Context, stateSourceObject state.Source) {
	stateSourceObject.Load(0, &f.fd)
	stateSourceObject.Load(1, &f.aname)
	stateSourceObject.Load(2, &f.interop)
	stateSourceObject.Load(3, &f.dfltuid)
	stateSourceObject.Load(4, &f.dfltgid)
	stateSourceObject.Load(5, &f.dcache)
	stateSourceObject.Load(6, &f.forcePageCache)
	stateSourceObject.Load(7, &f.limitHostFDTranslation)
	stateSourceObject.Load(8, &f.overlayfsStaleRead)
	stateSourceObject.Load(9, &f.regularFilesUseSpecialFileFD)
	stateSourceObject.Load(10, &f.disableFifoOpen)
	stateSourceObject.Load(11, &f.directfs)
}

func (d *directfsOpts) StateTypeName() string {
	return "pkg/sentry/fsimpl/gofer.directfsOpts"
}

func (d *directfsOpts) StateFields() []string {
	return []string{
		"enabled",
	}
}

func (d *directfsOpts) beforeSave() {}

// +checklocksignore
func (d *directfsOpts) StateSave(stateSinkObject state.Sink) {
	d.beforeSave()
	stateSinkObject.Save(0, &d.enabled)
}

func (d *directfsOpts) afterLoad(context.Context) {}

// +checklocksignore
func (d *directfsOpts) StateLoad(ctx context.Context, stateSourceObject state.Source) {
	stateSourceObject.Load(0, &d.enabled)
}

func (i *InteropMode) StateTypeName() string {
	return "pkg/sentry/fsimpl/gofer.InteropMode"
}

func (i *InteropMode) StateFields() []string {
	return nil
}

func (i *InternalFilesystemOptions) StateTypeName() string {
	return "pkg/sentry/fsimpl/gofer.InternalFilesystemOptions"
}

func (i *InternalFilesystemOptions) StateFields() []string {
	return []string{
		"UniqueID",
		"LeakConnection",
		"OpenSocketsByConnecting",
	}
}

func (i *InternalFilesystemOptions) beforeSave() {}

// +checklocksignore
func (i *InternalFilesystemOptions) StateSave(stateSinkObject state.Sink) {
	i.beforeSave()
	stateSinkObject.Save(0, &i.UniqueID)
	stateSinkObject.Save(1, &i.LeakConnection)
	stateSinkObject.Save(2, &i.OpenSocketsByConnecting)
}

func (i *InternalFilesystemOptions) afterLoad(context.Context) {}

// +checklocksignore
func (i *InternalFilesystemOptions) StateLoad(ctx context.Context, stateSourceObject state.Source) {
	stateSourceObject.Load(0, &i.UniqueID)
	stateSourceObject.Load(1, &i.LeakConnection)
	stateSourceObject.Load(2, &i.OpenSocketsByConnecting)
}

func (i *inoKey) StateTypeName() string {
	return "pkg/sentry/fsimpl/gofer.inoKey"
}

func (i *inoKey) StateFields() []string {
	return []string{
		"ino",
		"devMinor",
		"devMajor",
	}
}

func (i *inoKey) beforeSave() {}

// +checklocksignore
func (i *inoKey) StateSave(stateSinkObject state.Sink) {
	i.beforeSave()
	stateSinkObject.Save(0, &i.ino)
	stateSinkObject.Save(1, &i.devMinor)
	stateSinkObject.Save(2, &i.devMajor)
}

func (i *inoKey) afterLoad(context.Context) {}

// +checklocksignore
func (i *inoKey) StateLoad(ctx context.Context, stateSourceObject state.Source) {
	stateSourceObject.Load(0, &i.ino)
	stateSourceObject.Load(1, &i.devMinor)
	stateSourceObject.Load(2, &i.devMajor)
}

func (i *inode) StateTypeName() string {
	return "pkg/sentry/fsimpl/gofer.inode"
}

func (i *inode) StateFields() []string {
	return []string{
		"fs",
		"inoKey",
		"ino",
		"mode",
		"uid",
		"gid",
		"blockSize",
		"atime",
		"mtime",
		"ctime",
		"btime",
		"size",
		"atimeDirty",
		"mtimeDirty",
		"nlink",
		"mappings",
		"cache",
		"dirty",
		"savedDeletedData",
		"pf",
		"haveTarget",
		"target",
		"endpoint",
		"pipe",
		"locks",
		"watches",
		"refs",
		"impl",
	}
}

func (i *inode) beforeSave() {}

// +checklocksignore
func (i *inode) StateSave(stateSinkObject state.Sink) {
	i.beforeSave()
	stateSinkObject.Save(0, &i.fs)
	stateSinkObject.Save(1, &i.inoKey)
	stateSinkObject.Save(2, &i.ino)
	stateSinkObject.Save(3, &i.mode)
	stateSinkObject.Save(4, &i.uid)
	stateSinkObject.Save(5, &i.gid)
	stateSinkObject.Save(6, &i.blockSize)
	stateSinkObject.Save(7, &i.atime)
	stateSinkObject.Save(8, &i.mtime)
	stateSinkObject.Save(9, &i.ctime)
	stateSinkObject.Save(10, &i.btime)
	stateSinkObject.Save(11, &i.size)
	stateSinkObject.Save(12, &i.atimeDirty)
	stateSinkObject.Save(13, &i.mtimeDirty)
	stateSinkObject.Save(14, &i.nlink)
	stateSinkObject.Save(15, &i.mappings)
	stateSinkObject.Save(16, &i.cache)
	stateSinkObject.Save(17, &i.dirty)
	stateSinkObject.Save(18, &i.savedDeletedData)
	stateSinkObject.Save(19, &i.pf)
	stateSinkObject.Save(20, &i.haveTarget)
	stateSinkObject.Save(21, &i.target)
	stateSinkObject.Save(22, &i.endpoint)
	stateSinkObject.Save(23, &i.pipe)
	stateSinkObject.Save(24, &i.locks)
	stateSinkObject.Save(25, &i.watches)
	stateSinkObject.Save(26, &i.refs)
	stateSinkObject.Save(27, &i.impl)
}

// +checklocksignore
func (i *inode) StateLoad(ctx context.Context, stateSourceObject state.Source) {
	stateSourceObject.Load(0, &i.fs)
	stateSourceObject.Load(1, &i.inoKey)
	stateSourceObject.Load(2, &i.ino)
	stateSourceObject.Load(3, &i.mode)
	stateSourceObject.Load(4, &i.uid)
	stateSourceObject.Load(5, &i.gid)
	stateSourceObject.Load(6, &i.blockSize)
	stateSourceObject.Load(7, &i.atime)
	stateSourceObject.Load(8, &i.mtime)
	stateSourceObject.Load(9, &i.ctime)
	stateSourceObject.Load(10, &i.btime)
	stateSourceObject.Load(11, &i.size)
	stateSourceObject.Load(12, &i.atimeDirty)
	stateSourceObject.Load(13, &i.mtimeDirty)
	stateSourceObject.Load(14, &i.nlink)
	stateSourceObject.Load(15, &i.mappings)
	stateSourceObject.Load(16, &i.cache)
	stateSourceObject.Load(17, &i.dirty)
	stateSourceObject.Load(18, &i.savedDeletedData)
	stateSourceObject.Load(19, &i.pf)
	stateSourceObject.Load(20, &i.haveTarget)
	stateSourceObject.Load(21, &i.target)
	stateSourceObject.Load(22, &i.endpoint)
	stateSourceObject.Load(23, &i.pipe)
	stateSourceObject.Load(24, &i.locks)
	stateSourceObject.Load(25, &i.watches)
	stateSourceObject.Load(26, &i.refs)
	stateSourceObject.Load(27, &i.impl)
	stateSourceObject.AfterLoad(func() { i.afterLoad(ctx) })
}

func (d *dentry) StateTypeName() string {
	return "pkg/sentry/fsimpl/gofer.dentry"
}

func (d *dentry) StateFields() []string {
	return []string{
		"vfsd",
		"refs",
		"parent",
		"name",
		"inode",
		"deleted",
		"cached",
		"cacheEntry",
		"syncableListEntry",
		"children",
		"syntheticChildren",
		"forMountpoint",
	}
}

// +checklocksignore
func (d *dentry) StateSave(stateSinkObject state.Sink) {
	d.beforeSave()
	var parentValue *dentry
	parentValue = d.saveParent()
	stateSinkObject.SaveValue(2, parentValue)
	stateSinkObject.Save(0, &d.vfsd)
	stateSinkObject.Save(1, &d.refs)
	stateSinkObject.Save(3, &d.name)
	stateSinkObject.Save(4, &d.inode)
	stateSinkObject.Save(5, &d.deleted)
	stateSinkObject.Save(6, &d.cached)
	stateSinkObject.Save(7, &d.cacheEntry)
	stateSinkObject.Save(8, &d.syncableListEntry)
	stateSinkObject.Save(9, &d.children)
	stateSinkObject.Save(10, &d.syntheticChildren)
	stateSinkObject.Save(11, &d.forMountpoint)
}

// +checklocksignore
func (d *dentry) StateLoad(ctx context.Context, stateSourceObject state.Source) {
	stateSourceObject.Load(0, &d.vfsd)
	stateSourceObject.Load(1, &d.refs)
	stateSourceObject.Load(3, &d.name)
	stateSourceObject.Load(4, &d.inode)
	stateSourceObject.Load(5, &d.deleted)
	stateSourceObject.Load(6, &d.cached)
	stateSourceObject.Load(7, &d.cacheEntry)
	stateSourceObject.Load(8, &d.syncableListEntry)
	stateSourceObject.Load(9, &d.children)
	stateSourceObject.Load(10, &d.syntheticChildren)
	stateSourceObject.Load(11, &d.forMountpoint)
	stateSourceObject.LoadValue(2, new(*dentry), func(y any) { d.loadParent(ctx, y.(*dentry)) })
	stateSourceObject.AfterLoad(func() { d.afterLoad(ctx) })
}

func (s *stringListElem) StateTypeName() string {
	return "pkg/sentry/fsimpl/gofer.stringListElem"
}

func (s *stringListElem) StateFields() []string {
	return []string{
		"str",
		"stringEntry",
	}
}

func (s *stringListElem) beforeSave() {}

// +checklocksignore
func (s *stringListElem) StateSave(stateSinkObject state.Sink) {
	s.beforeSave()
	stateSinkObject.Save(0, &s.str)
	stateSinkObject.Save(1, &s.stringEntry)
}

func (s *stringListElem) afterLoad(context.Context) {}

// +checklocksignore
func (s *stringListElem) StateLoad(ctx context.Context, stateSourceObject state.Source) {
	stateSourceObject.Load(0, &s.str)
	stateSourceObject.Load(1, &s.stringEntry)
}

func (d *dentryListElem) StateTypeName() string {
	return "pkg/sentry/fsimpl/gofer.dentryListElem"
}

func (d *dentryListElem) StateFields() []string {
	return []string{
		"d",
		"dentryEntry",
	}
}

func (d *dentryListElem) beforeSave() {}

// +checklocksignore
func (d *dentryListElem) StateSave(stateSinkObject state.Sink) {
	d.beforeSave()
	stateSinkObject.Save(0, &d.d)
	stateSinkObject.Save(1, &d.dentryEntry)
}

func (d *dentryListElem) afterLoad(context.Context) {}

// +checklocksignore
func (d *dentryListElem) StateLoad(ctx context.Context, stateSourceObject state.Source) {
	stateSourceObject.Load(0, &d.d)
	stateSourceObject.Load(1, &d.dentryEntry)
}

func (fd *fileDescription) StateTypeName() string {
	return "pkg/sentry/fsimpl/gofer.fileDescription"
}

func (fd *fileDescription) StateFields() []string {
	return []string{
		"vfsfd",
		"FileDescriptionDefaultImpl",
		"LockFD",
	}
}

func (fd *fileDescription) beforeSave() {}

// +checklocksignore
func (fd *fileDescription) StateSave(stateSinkObject state.Sink) {
	fd.beforeSave()
	stateSinkObject.Save(0, &fd.vfsfd)
	stateSinkObject.Save(1, &fd.FileDescriptionDefaultImpl)
	stateSinkObject.Save(2, &fd.LockFD)
}

func (fd *fileDescription) afterLoad(context.Context) {}

// +checklocksignore
func (fd *fileDescription) StateLoad(ctx context.Context, stateSourceObject state.Source) {
	stateSourceObject.Load(0, &fd.vfsfd)
	stateSourceObject.Load(1, &fd.FileDescriptionDefaultImpl)
	stateSourceObject.Load(2, &fd.LockFD)
}

func (r *inodeRefs) StateTypeName() string {
	return "pkg/sentry/fsimpl/gofer.inodeRefs"
}

func (r *inodeRefs) StateFields() []string {
	return []string{
		"refCount",
	}
}

func (r *inodeRefs) beforeSave() {}

// +checklocksignore
func (r *inodeRefs) StateSave(stateSinkObject state.Sink) {
	r.beforeSave()
	stateSinkObject.Save(0, &r.refCount)
}

// +checklocksignore
func (r *inodeRefs) StateLoad(ctx context.Context, stateSourceObject state.Source) {
	stateSourceObject.Load(0, &r.refCount)
	stateSourceObject.AfterLoad(func() { r.afterLoad(ctx) })
}

func (i *lisafsInode) StateTypeName() string {
	return "pkg/sentry/fsimpl/gofer.lisafsInode"
}

func (i *lisafsInode) StateFields() []string {
	return []string{
		"inode",
	}
}

func (i *lisafsInode) beforeSave() {}

// +checklocksignore
func (i *lisafsInode) StateSave(stateSinkObject state.Sink) {
	i.beforeSave()
	stateSinkObject.Save(0, &i.inode)
}

func (i *lisafsInode) afterLoad(context.Context) {}

// +checklocksignore
func (i *lisafsInode) StateLoad(ctx context.Context, stateSourceObject state.Source) {
	stateSourceObject.Load(0, &i.inode)
}

func (fd *regularFileFD) StateTypeName() string {
	return "pkg/sentry/fsimpl/gofer.regularFileFD"
}

func (fd *regularFileFD) StateFields() []string {
	return []string{
		"fileDescription",
		"off",
	}
}

func (fd *regularFileFD) beforeSave() {}

// +checklocksignore
func (fd *regularFileFD) StateSave(stateSinkObject state.Sink) {
	fd.beforeSave()
	stateSinkObject.Save(0, &fd.fileDescription)
	stateSinkObject.Save(1, &fd.off)
}

func (fd *regularFileFD) afterLoad(context.Context) {}

// +checklocksignore
func (fd *regularFileFD) StateLoad(ctx context.Context, stateSourceObject state.Source) {
	stateSourceObject.Load(0, &fd.fileDescription)
	stateSourceObject.Load(1, &fd.off)
}

func (i *inodePlatformFile) StateTypeName() string {
	return "pkg/sentry/fsimpl/gofer.inodePlatformFile"
}

func (i *inodePlatformFile) StateFields() []string {
	return []string{
		"DefaultMemoryType",
		"NoBufferedIOFallback",
		"inode",
		"fdRefs",
		"hostFileMapper",
	}
}

func (i *inodePlatformFile) beforeSave() {}

// +checklocksignore
func (i *inodePlatformFile) StateSave(stateSinkObject state.Sink) {
	i.beforeSave()
	stateSinkObject.Save(0, &i.DefaultMemoryType)
	stateSinkObject.Save(1, &i.NoBufferedIOFallback)
	stateSinkObject.Save(2, &i.inode)
	stateSinkObject.Save(3, &i.fdRefs)
	stateSinkObject.Save(4, &i.hostFileMapper)
}

// +checklocksignore
func (i *inodePlatformFile) StateLoad(ctx context.Context, stateSourceObject state.Source) {
	stateSourceObject.Load(0, &i.DefaultMemoryType)
	stateSourceObject.Load(1, &i.NoBufferedIOFallback)
	stateSourceObject.Load(2, &i.inode)
	stateSourceObject.Load(3, &i.fdRefs)
	stateSourceObject.Load(4, &i.hostFileMapper)
	stateSourceObject.AfterLoad(func() { i.afterLoad(ctx) })
}

func (s *savedDentryRW) StateTypeName() string {
	return "pkg/sentry/fsimpl/gofer.savedDentryRW"
}

func (s *savedDentryRW) StateFields() []string {
	return []string{
		"read",
		"write",
	}
}

func (s *savedDentryRW) beforeSave() {}

// +checklocksignore
func (s *savedDentryRW) StateSave(stateSinkObject state.Sink) {
	s.beforeSave()
	stateSinkObject.Save(0, &s.read)
	stateSinkObject.Save(1, &s.write)
}

func (s *savedDentryRW) afterLoad(context.Context) {}

// +checklocksignore
func (s *savedDentryRW) StateLoad(ctx context.Context, stateSourceObject state.Source) {
	stateSourceObject.Load(0, &s.read)
	stateSourceObject.Load(1, &s.write)
}

func (e *endpoint) StateTypeName() string {
	return "pkg/sentry/fsimpl/gofer.endpoint"
}

func (e *endpoint) StateFields() []string {
	return []string{
		"dentry",
		"path",
	}
}

func (e *endpoint) beforeSave() {}

// +checklocksignore
func (e *endpoint) StateSave(stateSinkObject state.Sink) {
	e.beforeSave()
	stateSinkObject.Save(0, &e.dentry)
	stateSinkObject.Save(1, &e.path)
}

func (e *endpoint) afterLoad(context.Context) {}

// +checklocksignore
func (e *endpoint) StateLoad(ctx context.Context, stateSourceObject state.Source) {
	stateSourceObject.Load(0, &e.dentry)
	stateSourceObject.Load(1, &e.path)
}

func (l *specialFDList) StateTypeName() string {
	return "pkg/sentry/fsimpl/gofer.specialFDList"
}

func (l *specialFDList) StateFields() []string {
	return []string{
		"head",
		"tail",
	}
}

func (l *specialFDList) beforeSave() {}

// +checklocksignore
func (l *specialFDList) StateSave(stateSinkObject state.Sink) {
	l.beforeSave()
	stateSinkObject.Save(0, &l.head)
	stateSinkObject.Save(1, &l.tail)
}

func (l *specialFDList) afterLoad(context.Context) {}

// +checklocksignore
func (l *specialFDList) StateLoad(ctx context.Context, stateSourceObject state.Source) {
	stateSourceObject.Load(0, &l.head)
	stateSourceObject.Load(1, &l.tail)
}

func (e *specialFDEntry) StateTypeName() string {
	return "pkg/sentry/fsimpl/gofer.specialFDEntry"
}

func (e *specialFDEntry) StateFields() []string {
	return []string{
		"next",
		"prev",
	}
}

func (e *specialFDEntry) beforeSave() {}

// +checklocksignore
func (e *specialFDEntry) StateSave(stateSinkObject state.Sink) {
	e.beforeSave()
	stateSinkObject.Save(0, &e.next)
	stateSinkObject.Save(1, &e.prev)
}

func (e *specialFDEntry) afterLoad(context.Context) {}

// +checklocksignore
func (e *specialFDEntry) StateLoad(ctx context.Context, stateSourceObject state.Source) {
	stateSourceObject.Load(0, &e.next)
	stateSourceObject.Load(1, &e.prev)
}

func (fd *specialFileFD) StateTypeName() string {
	return "pkg/sentry/fsimpl/gofer.specialFileFD"
}

func (fd *specialFileFD) StateFields() []string {
	return []string{
		"fileDescription",
		"specialFDEntry",
		"DefaultMemoryType",
		"NoBufferedIOFallback",
		"isRegularFile",
		"seekable",
		"queue",
		"off",
		"haveBuf",
		"buf",
		"hostFileMapper",
		"fileRefs",
	}
}

func (fd *specialFileFD) beforeSave() {}

// +checklocksignore
func (fd *specialFileFD) StateSave(stateSinkObject state.Sink) {
	fd.beforeSave()
	stateSinkObject.Save(0, &fd.fileDescription)
	stateSinkObject.Save(1, &fd.specialFDEntry)
	stateSinkObject.Save(2, &fd.DefaultMemoryType)
	stateSinkObject.Save(3, &fd.NoBufferedIOFallback)
	stateSinkObject.Save(4, &fd.isRegularFile)
	stateSinkObject.Save(5, &fd.seekable)
	stateSinkObject.Save(6, &fd.queue)
	stateSinkObject.Save(7, &fd.off)
	stateSinkObject.Save(8, &fd.haveBuf)
	stateSinkObject.Save(9, &fd.buf)
	stateSinkObject.Save(10, &fd.hostFileMapper)
	stateSinkObject.Save(11, &fd.fileRefs)
}

// +checklocksignore
func (fd *specialFileFD) StateLoad(ctx context.Context, stateSourceObject state.Source) {
	stateSourceObject.Load(0, &fd.fileDescription)
	stateSourceObject.Load(1, &fd.specialFDEntry)
	stateSourceObject.Load(2, &fd.DefaultMemoryType)
	stateSourceObject.Load(3, &fd.NoBufferedIOFallback)
	stateSourceObject.Load(4, &fd.isRegularFile)
	stateSourceObject.Load(5, &fd.seekable)
	stateSourceObject.Load(6, &fd.queue)
	stateSourceObject.Load(7, &fd.off)
	stateSourceObject.Load(8, &fd.haveBuf)
	stateSourceObject.Load(9, &fd.buf)
	stateSourceObject.Load(10, &fd.hostFileMapper)
	stateSourceObject.Load(11, &fd.fileRefs)
	stateSourceObject.AfterLoad(func() { fd.afterLoad(ctx) })
}

func (l *stringList) StateTypeName() string {
	return "pkg/sentry/fsimpl/gofer.stringList"
}

func (l *stringList) StateFields() []string {
	return []string{
		"head",
		"tail",
	}
}

func (l *stringList) beforeSave() {}

// +checklocksignore
func (l *stringList) StateSave(stateSinkObject state.Sink) {
	l.beforeSave()
	stateSinkObject.Save(0, &l.head)
	stateSinkObject.Save(1, &l.tail)
}

func (l *stringList) afterLoad(context.Context) {}

// +checklocksignore
func (l *stringList) StateLoad(ctx context.Context, stateSourceObject state.Source) {
	stateSourceObject.Load(0, &l.head)
	stateSourceObject.Load(1, &l.tail)
}

func (e *stringEntry) StateTypeName() string {
	return "pkg/sentry/fsimpl/gofer.stringEntry"
}

func (e *stringEntry) StateFields() []string {
	return []string{
		"next",
		"prev",
	}
}

func (e *stringEntry) beforeSave() {}

// +checklocksignore
func (e *stringEntry) StateSave(stateSinkObject state.Sink) {
	e.beforeSave()
	stateSinkObject.Save(0, &e.next)
	stateSinkObject.Save(1, &e.prev)
}

func (e *stringEntry) afterLoad(context.Context) {}

// +checklocksignore
func (e *stringEntry) StateLoad(ctx context.Context, stateSourceObject state.Source) {
	stateSourceObject.Load(0, &e.next)
	stateSourceObject.Load(1, &e.prev)
}

func init() {
	state.Register((*dentryList)(nil))
	state.Register((*dentryEntry)(nil))
	state.Register((*directfsInode)(nil))
	state.Register((*directoryFD)(nil))
	state.Register((*stringFixedCache)(nil))
	state.Register((*dentryCache)(nil))
	state.Register((*FilesystemType)(nil))
	state.Register((*filesystem)(nil))
	state.Register((*filesystemOptions)(nil))
	state.Register((*directfsOpts)(nil))
	state.Register((*InteropMode)(nil))
	state.Register((*InternalFilesystemOptions)(nil))
	state.Register((*inoKey)(nil))
	state.Register((*inode)(nil))
	state.Register((*dentry)(nil))
	state.Register((*stringListElem)(nil))
	state.Register((*dentryListElem)(nil))
	state.Register((*fileDescription)(nil))
	state.Register((*inodeRefs)(nil))
	state.Register((*lisafsInode)(nil))
	state.Register((*regularFileFD)(nil))
	state.Register((*inodePlatformFile)(nil))
	state.Register((*savedDentryRW)(nil))
	state.Register((*endpoint)(nil))
	state.Register((*specialFDList)(nil))
	state.Register((*specialFDEntry)(nil))
	state.Register((*specialFileFD)(nil))
	state.Register((*stringList)(nil))
	state.Register((*stringEntry)(nil))
}
