// automatically generated by stateify.

package kernfs

import (
	"context"

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

func (l *dentryList) StateTypeName() string {
	return "pkg/sentry/fsimpl/kernfs.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/kernfs.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 (f *DynamicBytesFile) StateTypeName() string {
	return "pkg/sentry/fsimpl/kernfs.DynamicBytesFile"
}

func (f *DynamicBytesFile) StateFields() []string {
	return []string{
		"InodeAttrs",
		"InodeNoStatFS",
		"InodeNoopRefCount",
		"InodeNotAnonymous",
		"InodeNotDirectory",
		"InodeNotSymlink",
		"InodeWatches",
		"InodeFSOwned",
		"locks",
		"data",
		"dataSourceProvider",
	}
}

func (f *DynamicBytesFile) beforeSave() {}

// +checklocksignore
func (f *DynamicBytesFile) StateSave(stateSinkObject state.Sink) {
	f.beforeSave()
	stateSinkObject.Save(0, &f.InodeAttrs)
	stateSinkObject.Save(1, &f.InodeNoStatFS)
	stateSinkObject.Save(2, &f.InodeNoopRefCount)
	stateSinkObject.Save(3, &f.InodeNotAnonymous)
	stateSinkObject.Save(4, &f.InodeNotDirectory)
	stateSinkObject.Save(5, &f.InodeNotSymlink)
	stateSinkObject.Save(6, &f.InodeWatches)
	stateSinkObject.Save(7, &f.InodeFSOwned)
	stateSinkObject.Save(8, &f.locks)
	stateSinkObject.Save(9, &f.data)
	stateSinkObject.Save(10, &f.dataSourceProvider)
}

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

// +checklocksignore
func (f *DynamicBytesFile) StateLoad(ctx context.Context, stateSourceObject state.Source) {
	stateSourceObject.Load(0, &f.InodeAttrs)
	stateSourceObject.Load(1, &f.InodeNoStatFS)
	stateSourceObject.Load(2, &f.InodeNoopRefCount)
	stateSourceObject.Load(3, &f.InodeNotAnonymous)
	stateSourceObject.Load(4, &f.InodeNotDirectory)
	stateSourceObject.Load(5, &f.InodeNotSymlink)
	stateSourceObject.Load(6, &f.InodeWatches)
	stateSourceObject.Load(7, &f.InodeFSOwned)
	stateSourceObject.Load(8, &f.locks)
	stateSourceObject.Load(9, &f.data)
	stateSourceObject.Load(10, &f.dataSourceProvider)
}

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

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

func (fd *DynamicBytesFD) beforeSave() {}

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

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

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

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

func (s *SeekEndConfig) StateFields() []string {
	return nil
}

func (g *GenericDirectoryFDOptions) StateTypeName() string {
	return "pkg/sentry/fsimpl/kernfs.GenericDirectoryFDOptions"
}

func (g *GenericDirectoryFDOptions) StateFields() []string {
	return []string{
		"SeekEnd",
	}
}

func (g *GenericDirectoryFDOptions) beforeSave() {}

// +checklocksignore
func (g *GenericDirectoryFDOptions) StateSave(stateSinkObject state.Sink) {
	g.beforeSave()
	stateSinkObject.Save(0, &g.SeekEnd)
}

func (g *GenericDirectoryFDOptions) afterLoad(context.Context) {}

// +checklocksignore
func (g *GenericDirectoryFDOptions) StateLoad(ctx context.Context, stateSourceObject state.Source) {
	stateSourceObject.Load(0, &g.SeekEnd)
}

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

func (fd *GenericDirectoryFD) StateFields() []string {
	return []string{
		"FileDescriptionDefaultImpl",
		"DirectoryFileDescriptionDefaultImpl",
		"LockFD",
		"seekEnd",
		"vfsfd",
		"children",
		"off",
	}
}

func (fd *GenericDirectoryFD) beforeSave() {}

// +checklocksignore
func (fd *GenericDirectoryFD) StateSave(stateSinkObject state.Sink) {
	fd.beforeSave()
	stateSinkObject.Save(0, &fd.FileDescriptionDefaultImpl)
	stateSinkObject.Save(1, &fd.DirectoryFileDescriptionDefaultImpl)
	stateSinkObject.Save(2, &fd.LockFD)
	stateSinkObject.Save(3, &fd.seekEnd)
	stateSinkObject.Save(4, &fd.vfsfd)
	stateSinkObject.Save(5, &fd.children)
	stateSinkObject.Save(6, &fd.off)
}

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

// +checklocksignore
func (fd *GenericDirectoryFD) StateLoad(ctx context.Context, stateSourceObject state.Source) {
	stateSourceObject.Load(0, &fd.FileDescriptionDefaultImpl)
	stateSourceObject.Load(1, &fd.DirectoryFileDescriptionDefaultImpl)
	stateSourceObject.Load(2, &fd.LockFD)
	stateSourceObject.Load(3, &fd.seekEnd)
	stateSourceObject.Load(4, &fd.vfsfd)
	stateSourceObject.Load(5, &fd.children)
	stateSourceObject.Load(6, &fd.off)
}

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

func (i *InodeNoopRefCount) StateFields() []string {
	return []string{
		"InodeTemporary",
	}
}

func (i *InodeNoopRefCount) beforeSave() {}

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

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

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

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

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

func (i *InodeDirectoryNoNewChildren) beforeSave() {}

// +checklocksignore
func (i *InodeDirectoryNoNewChildren) StateSave(stateSinkObject state.Sink) {
	i.beforeSave()
}

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

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

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

func (i *InodeNotDirectory) StateFields() []string {
	return []string{
		"InodeAlwaysValid",
	}
}

func (i *InodeNotDirectory) beforeSave() {}

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

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

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

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

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

func (i *InodeNotSymlink) beforeSave() {}

// +checklocksignore
func (i *InodeNotSymlink) StateSave(stateSinkObject state.Sink) {
	i.beforeSave()
}

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

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

func (a *InodeAttrs) StateTypeName() string {
	return "pkg/sentry/fsimpl/kernfs.InodeAttrs"
}

func (a *InodeAttrs) StateFields() []string {
	return []string{
		"devMajor",
		"devMinor",
		"ino",
		"mode",
		"uid",
		"gid",
		"nlink",
		"blockSize",
		"atime",
		"mtime",
		"ctime",
	}
}

func (a *InodeAttrs) beforeSave() {}

// +checklocksignore
func (a *InodeAttrs) StateSave(stateSinkObject state.Sink) {
	a.beforeSave()
	stateSinkObject.Save(0, &a.devMajor)
	stateSinkObject.Save(1, &a.devMinor)
	stateSinkObject.Save(2, &a.ino)
	stateSinkObject.Save(3, &a.mode)
	stateSinkObject.Save(4, &a.uid)
	stateSinkObject.Save(5, &a.gid)
	stateSinkObject.Save(6, &a.nlink)
	stateSinkObject.Save(7, &a.blockSize)
	stateSinkObject.Save(8, &a.atime)
	stateSinkObject.Save(9, &a.mtime)
	stateSinkObject.Save(10, &a.ctime)
}

func (a *InodeAttrs) afterLoad(context.Context) {}

// +checklocksignore
func (a *InodeAttrs) StateLoad(ctx context.Context, stateSourceObject state.Source) {
	stateSourceObject.Load(0, &a.devMajor)
	stateSourceObject.Load(1, &a.devMinor)
	stateSourceObject.Load(2, &a.ino)
	stateSourceObject.Load(3, &a.mode)
	stateSourceObject.Load(4, &a.uid)
	stateSourceObject.Load(5, &a.gid)
	stateSourceObject.Load(6, &a.nlink)
	stateSourceObject.Load(7, &a.blockSize)
	stateSourceObject.Load(8, &a.atime)
	stateSourceObject.Load(9, &a.mtime)
	stateSourceObject.Load(10, &a.ctime)
}

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

func (s *slot) StateFields() []string {
	return []string{
		"name",
		"inode",
		"static",
		"slotEntry",
	}
}

func (s *slot) beforeSave() {}

// +checklocksignore
func (s *slot) StateSave(stateSinkObject state.Sink) {
	s.beforeSave()
	stateSinkObject.Save(0, &s.name)
	stateSinkObject.Save(1, &s.inode)
	stateSinkObject.Save(2, &s.static)
	stateSinkObject.Save(3, &s.slotEntry)
}

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

// +checklocksignore
func (s *slot) StateLoad(ctx context.Context, stateSourceObject state.Source) {
	stateSourceObject.Load(0, &s.name)
	stateSourceObject.Load(1, &s.inode)
	stateSourceObject.Load(2, &s.static)
	stateSourceObject.Load(3, &s.slotEntry)
}

func (o *OrderedChildrenOptions) StateTypeName() string {
	return "pkg/sentry/fsimpl/kernfs.OrderedChildrenOptions"
}

func (o *OrderedChildrenOptions) StateFields() []string {
	return []string{
		"Writable",
	}
}

func (o *OrderedChildrenOptions) beforeSave() {}

// +checklocksignore
func (o *OrderedChildrenOptions) StateSave(stateSinkObject state.Sink) {
	o.beforeSave()
	stateSinkObject.Save(0, &o.Writable)
}

func (o *OrderedChildrenOptions) afterLoad(context.Context) {}

// +checklocksignore
func (o *OrderedChildrenOptions) StateLoad(ctx context.Context, stateSourceObject state.Source) {
	stateSourceObject.Load(0, &o.Writable)
}

func (o *OrderedChildren) StateTypeName() string {
	return "pkg/sentry/fsimpl/kernfs.OrderedChildren"
}

func (o *OrderedChildren) StateFields() []string {
	return []string{
		"writable",
		"order",
		"set",
	}
}

func (o *OrderedChildren) beforeSave() {}

// +checklocksignore
func (o *OrderedChildren) StateSave(stateSinkObject state.Sink) {
	o.beforeSave()
	stateSinkObject.Save(0, &o.writable)
	stateSinkObject.Save(1, &o.order)
	stateSinkObject.Save(2, &o.set)
}

func (o *OrderedChildren) afterLoad(context.Context) {}

// +checklocksignore
func (o *OrderedChildren) StateLoad(ctx context.Context, stateSourceObject state.Source) {
	stateSourceObject.Load(0, &o.writable)
	stateSourceObject.Load(1, &o.order)
	stateSourceObject.Load(2, &o.set)
}

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

func (i *InodeSymlink) StateFields() []string {
	return []string{
		"InodeNotDirectory",
	}
}

func (i *InodeSymlink) beforeSave() {}

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

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

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

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

func (s *StaticDirectory) StateFields() []string {
	return []string{
		"InodeAlwaysValid",
		"InodeAttrs",
		"InodeDirectoryNoNewChildren",
		"InodeNoStatFS",
		"InodeNotAnonymous",
		"InodeNotSymlink",
		"InodeTemporary",
		"InodeWatches",
		"OrderedChildren",
		"StaticDirectoryRefs",
		"InodeFSOwned",
		"locks",
		"fdOpts",
	}
}

func (s *StaticDirectory) beforeSave() {}

// +checklocksignore
func (s *StaticDirectory) StateSave(stateSinkObject state.Sink) {
	s.beforeSave()
	stateSinkObject.Save(0, &s.InodeAlwaysValid)
	stateSinkObject.Save(1, &s.InodeAttrs)
	stateSinkObject.Save(2, &s.InodeDirectoryNoNewChildren)
	stateSinkObject.Save(3, &s.InodeNoStatFS)
	stateSinkObject.Save(4, &s.InodeNotAnonymous)
	stateSinkObject.Save(5, &s.InodeNotSymlink)
	stateSinkObject.Save(6, &s.InodeTemporary)
	stateSinkObject.Save(7, &s.InodeWatches)
	stateSinkObject.Save(8, &s.OrderedChildren)
	stateSinkObject.Save(9, &s.StaticDirectoryRefs)
	stateSinkObject.Save(10, &s.InodeFSOwned)
	stateSinkObject.Save(11, &s.locks)
	stateSinkObject.Save(12, &s.fdOpts)
}

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

// +checklocksignore
func (s *StaticDirectory) StateLoad(ctx context.Context, stateSourceObject state.Source) {
	stateSourceObject.Load(0, &s.InodeAlwaysValid)
	stateSourceObject.Load(1, &s.InodeAttrs)
	stateSourceObject.Load(2, &s.InodeDirectoryNoNewChildren)
	stateSourceObject.Load(3, &s.InodeNoStatFS)
	stateSourceObject.Load(4, &s.InodeNotAnonymous)
	stateSourceObject.Load(5, &s.InodeNotSymlink)
	stateSourceObject.Load(6, &s.InodeTemporary)
	stateSourceObject.Load(7, &s.InodeWatches)
	stateSourceObject.Load(8, &s.OrderedChildren)
	stateSourceObject.Load(9, &s.StaticDirectoryRefs)
	stateSourceObject.Load(10, &s.InodeFSOwned)
	stateSourceObject.Load(11, &s.locks)
	stateSourceObject.Load(12, &s.fdOpts)
}

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

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

func (i *InodeAlwaysValid) beforeSave() {}

// +checklocksignore
func (i *InodeAlwaysValid) StateSave(stateSinkObject state.Sink) {
	i.beforeSave()
}

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

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

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

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

func (i *InodeTemporary) beforeSave() {}

// +checklocksignore
func (i *InodeTemporary) StateSave(stateSinkObject state.Sink) {
	i.beforeSave()
}

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

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

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

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

func (i *InodeNoStatFS) beforeSave() {}

// +checklocksignore
func (i *InodeNoStatFS) StateSave(stateSinkObject state.Sink) {
	i.beforeSave()
}

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

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

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

func (i *InodeWatches) StateFields() []string {
	return []string{
		"watches",
	}
}

func (i *InodeWatches) beforeSave() {}

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

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

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

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

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

func (i *InodeAnonymous) beforeSave() {}

// +checklocksignore
func (i *InodeAnonymous) StateSave(stateSinkObject state.Sink) {
	i.beforeSave()
}

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

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

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

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

func (i *InodeNotAnonymous) beforeSave() {}

// +checklocksignore
func (i *InodeNotAnonymous) StateSave(stateSinkObject state.Sink) {
	i.beforeSave()
}

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

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

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

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

func (i *InodeFSOwned) beforeSave() {}

// +checklocksignore
func (i *InodeFSOwned) StateSave(stateSinkObject state.Sink) {
	i.beforeSave()
}

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

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

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

func (fs *Filesystem) StateFields() []string {
	return []string{
		"vfsfs",
		"deferredDecRefs",
		"nextInoMinusOne",
		"cachedDentries",
		"cachedDentriesLen",
		"MaxCachedDentries",
		"root",
	}
}

func (fs *Filesystem) beforeSave() {}

// +checklocksignore
func (fs *Filesystem) StateSave(stateSinkObject state.Sink) {
	fs.beforeSave()
	stateSinkObject.Save(0, &fs.vfsfs)
	stateSinkObject.Save(1, &fs.deferredDecRefs)
	stateSinkObject.Save(2, &fs.nextInoMinusOne)
	stateSinkObject.Save(3, &fs.cachedDentries)
	stateSinkObject.Save(4, &fs.cachedDentriesLen)
	stateSinkObject.Save(5, &fs.MaxCachedDentries)
	stateSinkObject.Save(6, &fs.root)
}

func (fs *Filesystem) afterLoad(context.Context) {}

// +checklocksignore
func (fs *Filesystem) StateLoad(ctx context.Context, stateSourceObject state.Source) {
	stateSourceObject.Load(0, &fs.vfsfs)
	stateSourceObject.Load(1, &fs.deferredDecRefs)
	stateSourceObject.Load(2, &fs.nextInoMinusOne)
	stateSourceObject.Load(3, &fs.cachedDentries)
	stateSourceObject.Load(4, &fs.cachedDentriesLen)
	stateSourceObject.Load(5, &fs.MaxCachedDentries)
	stateSourceObject.Load(6, &fs.root)
}

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

func (d *Dentry) StateFields() []string {
	return []string{
		"vfsd",
		"refs",
		"fs",
		"flags",
		"parent",
		"name",
		"cached",
		"dentryEntry",
		"children",
		"inode",
		"deleted",
	}
}

func (d *Dentry) beforeSave() {}

// +checklocksignore
func (d *Dentry) StateSave(stateSinkObject state.Sink) {
	d.beforeSave()
	parentValue := d.saveParent()
	_ = (*Dentry)(parentValue)
	stateSinkObject.SaveValue(4, parentValue)
	stateSinkObject.Save(0, &d.vfsd)
	stateSinkObject.Save(1, &d.refs)
	stateSinkObject.Save(2, &d.fs)
	stateSinkObject.Save(3, &d.flags)
	stateSinkObject.Save(5, &d.name)
	stateSinkObject.Save(6, &d.cached)
	stateSinkObject.Save(7, &d.dentryEntry)
	stateSinkObject.Save(8, &d.children)
	stateSinkObject.Save(9, &d.inode)
	stateSinkObject.Save(10, &d.deleted)
}

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

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

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

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.hostFD)
	stateSinkObject.Save(3, &i.fdRefs)
	stateSinkObject.Save(4, &i.fileMapper)
}

// +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.hostFD)
	stateSourceObject.Load(3, &i.fdRefs)
	stateSourceObject.Load(4, &i.fileMapper)
	stateSourceObject.AfterLoad(func() { i.afterLoad(ctx) })
}

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

func (i *CachedMappable) StateFields() []string {
	return []string{
		"mappings",
		"pf",
	}
}

func (i *CachedMappable) beforeSave() {}

// +checklocksignore
func (i *CachedMappable) StateSave(stateSinkObject state.Sink) {
	i.beforeSave()
	stateSinkObject.Save(0, &i.mappings)
	stateSinkObject.Save(1, &i.pf)
}

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

// +checklocksignore
func (i *CachedMappable) StateLoad(ctx context.Context, stateSourceObject state.Source) {
	stateSourceObject.Load(0, &i.mappings)
	stateSourceObject.Load(1, &i.pf)
}

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

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

func (l *slotList) beforeSave() {}

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

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

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

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

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

func (e *slotEntry) beforeSave() {}

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

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

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

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

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

func (r *StaticDirectoryRefs) beforeSave() {}

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

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

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

func (s *StaticSymlink) StateFields() []string {
	return []string{
		"InodeAttrs",
		"InodeNoopRefCount",
		"InodeNotAnonymous",
		"InodeSymlink",
		"InodeNoStatFS",
		"InodeWatches",
		"InodeFSOwned",
		"target",
	}
}

func (s *StaticSymlink) beforeSave() {}

// +checklocksignore
func (s *StaticSymlink) StateSave(stateSinkObject state.Sink) {
	s.beforeSave()
	stateSinkObject.Save(0, &s.InodeAttrs)
	stateSinkObject.Save(1, &s.InodeNoopRefCount)
	stateSinkObject.Save(2, &s.InodeNotAnonymous)
	stateSinkObject.Save(3, &s.InodeSymlink)
	stateSinkObject.Save(4, &s.InodeNoStatFS)
	stateSinkObject.Save(5, &s.InodeWatches)
	stateSinkObject.Save(6, &s.InodeFSOwned)
	stateSinkObject.Save(7, &s.target)
}

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

// +checklocksignore
func (s *StaticSymlink) StateLoad(ctx context.Context, stateSourceObject state.Source) {
	stateSourceObject.Load(0, &s.InodeAttrs)
	stateSourceObject.Load(1, &s.InodeNoopRefCount)
	stateSourceObject.Load(2, &s.InodeNotAnonymous)
	stateSourceObject.Load(3, &s.InodeSymlink)
	stateSourceObject.Load(4, &s.InodeNoStatFS)
	stateSourceObject.Load(5, &s.InodeWatches)
	stateSourceObject.Load(6, &s.InodeFSOwned)
	stateSourceObject.Load(7, &s.target)
}

func (dir *syntheticDirectory) StateTypeName() string {
	return "pkg/sentry/fsimpl/kernfs.syntheticDirectory"
}

func (dir *syntheticDirectory) StateFields() []string {
	return []string{
		"InodeAlwaysValid",
		"InodeAttrs",
		"InodeNoStatFS",
		"InodeNotAnonymous",
		"InodeNotSymlink",
		"InodeWatches",
		"OrderedChildren",
		"syntheticDirectoryRefs",
		"InodeFSOwned",
		"locks",
	}
}

func (dir *syntheticDirectory) beforeSave() {}

// +checklocksignore
func (dir *syntheticDirectory) StateSave(stateSinkObject state.Sink) {
	dir.beforeSave()
	stateSinkObject.Save(0, &dir.InodeAlwaysValid)
	stateSinkObject.Save(1, &dir.InodeAttrs)
	stateSinkObject.Save(2, &dir.InodeNoStatFS)
	stateSinkObject.Save(3, &dir.InodeNotAnonymous)
	stateSinkObject.Save(4, &dir.InodeNotSymlink)
	stateSinkObject.Save(5, &dir.InodeWatches)
	stateSinkObject.Save(6, &dir.OrderedChildren)
	stateSinkObject.Save(7, &dir.syntheticDirectoryRefs)
	stateSinkObject.Save(8, &dir.InodeFSOwned)
	stateSinkObject.Save(9, &dir.locks)
}

func (dir *syntheticDirectory) afterLoad(context.Context) {}

// +checklocksignore
func (dir *syntheticDirectory) StateLoad(ctx context.Context, stateSourceObject state.Source) {
	stateSourceObject.Load(0, &dir.InodeAlwaysValid)
	stateSourceObject.Load(1, &dir.InodeAttrs)
	stateSourceObject.Load(2, &dir.InodeNoStatFS)
	stateSourceObject.Load(3, &dir.InodeNotAnonymous)
	stateSourceObject.Load(4, &dir.InodeNotSymlink)
	stateSourceObject.Load(5, &dir.InodeWatches)
	stateSourceObject.Load(6, &dir.OrderedChildren)
	stateSourceObject.Load(7, &dir.syntheticDirectoryRefs)
	stateSourceObject.Load(8, &dir.InodeFSOwned)
	stateSourceObject.Load(9, &dir.locks)
}

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

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

func (r *syntheticDirectoryRefs) beforeSave() {}

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

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

func init() {
	state.Register((*dentryList)(nil))
	state.Register((*dentryEntry)(nil))
	state.Register((*DynamicBytesFile)(nil))
	state.Register((*DynamicBytesFD)(nil))
	state.Register((*SeekEndConfig)(nil))
	state.Register((*GenericDirectoryFDOptions)(nil))
	state.Register((*GenericDirectoryFD)(nil))
	state.Register((*InodeNoopRefCount)(nil))
	state.Register((*InodeDirectoryNoNewChildren)(nil))
	state.Register((*InodeNotDirectory)(nil))
	state.Register((*InodeNotSymlink)(nil))
	state.Register((*InodeAttrs)(nil))
	state.Register((*slot)(nil))
	state.Register((*OrderedChildrenOptions)(nil))
	state.Register((*OrderedChildren)(nil))
	state.Register((*InodeSymlink)(nil))
	state.Register((*StaticDirectory)(nil))
	state.Register((*InodeAlwaysValid)(nil))
	state.Register((*InodeTemporary)(nil))
	state.Register((*InodeNoStatFS)(nil))
	state.Register((*InodeWatches)(nil))
	state.Register((*InodeAnonymous)(nil))
	state.Register((*InodeNotAnonymous)(nil))
	state.Register((*InodeFSOwned)(nil))
	state.Register((*Filesystem)(nil))
	state.Register((*Dentry)(nil))
	state.Register((*inodePlatformFile)(nil))
	state.Register((*CachedMappable)(nil))
	state.Register((*slotList)(nil))
	state.Register((*slotEntry)(nil))
	state.Register((*StaticDirectoryRefs)(nil))
	state.Register((*StaticSymlink)(nil))
	state.Register((*syntheticDirectory)(nil))
	state.Register((*syntheticDirectoryRefs)(nil))
}
