github.com/metacubex/gvisor@v0.0.0-20240320004321-933faba989ec/pkg/sentry/fsimpl/gofer/gofer_state_autogen.go (about)

     1  // automatically generated by stateify.
     2  
     3  package gofer
     4  
     5  import (
     6  	"context"
     7  
     8  	"github.com/metacubex/gvisor/pkg/state"
     9  )
    10  
    11  func (l *dentryList) StateTypeName() string {
    12  	return "pkg/sentry/fsimpl/gofer.dentryList"
    13  }
    14  
    15  func (l *dentryList) StateFields() []string {
    16  	return []string{
    17  		"head",
    18  		"tail",
    19  	}
    20  }
    21  
    22  func (l *dentryList) beforeSave() {}
    23  
    24  // +checklocksignore
    25  func (l *dentryList) StateSave(stateSinkObject state.Sink) {
    26  	l.beforeSave()
    27  	stateSinkObject.Save(0, &l.head)
    28  	stateSinkObject.Save(1, &l.tail)
    29  }
    30  
    31  func (l *dentryList) afterLoad(context.Context) {}
    32  
    33  // +checklocksignore
    34  func (l *dentryList) StateLoad(ctx context.Context, stateSourceObject state.Source) {
    35  	stateSourceObject.Load(0, &l.head)
    36  	stateSourceObject.Load(1, &l.tail)
    37  }
    38  
    39  func (e *dentryEntry) StateTypeName() string {
    40  	return "pkg/sentry/fsimpl/gofer.dentryEntry"
    41  }
    42  
    43  func (e *dentryEntry) StateFields() []string {
    44  	return []string{
    45  		"next",
    46  		"prev",
    47  	}
    48  }
    49  
    50  func (e *dentryEntry) beforeSave() {}
    51  
    52  // +checklocksignore
    53  func (e *dentryEntry) StateSave(stateSinkObject state.Sink) {
    54  	e.beforeSave()
    55  	stateSinkObject.Save(0, &e.next)
    56  	stateSinkObject.Save(1, &e.prev)
    57  }
    58  
    59  func (e *dentryEntry) afterLoad(context.Context) {}
    60  
    61  // +checklocksignore
    62  func (e *dentryEntry) StateLoad(ctx context.Context, stateSourceObject state.Source) {
    63  	stateSourceObject.Load(0, &e.next)
    64  	stateSourceObject.Load(1, &e.prev)
    65  }
    66  
    67  func (d *directfsDentry) StateTypeName() string {
    68  	return "pkg/sentry/fsimpl/gofer.directfsDentry"
    69  }
    70  
    71  func (d *directfsDentry) StateFields() []string {
    72  	return []string{
    73  		"dentry",
    74  		"controlFD",
    75  	}
    76  }
    77  
    78  func (d *directfsDentry) beforeSave() {}
    79  
    80  // +checklocksignore
    81  func (d *directfsDentry) StateSave(stateSinkObject state.Sink) {
    82  	d.beforeSave()
    83  	stateSinkObject.Save(0, &d.dentry)
    84  	stateSinkObject.Save(1, &d.controlFD)
    85  }
    86  
    87  // +checklocksignore
    88  func (d *directfsDentry) StateLoad(ctx context.Context, stateSourceObject state.Source) {
    89  	stateSourceObject.Load(0, &d.dentry)
    90  	stateSourceObject.Load(1, &d.controlFD)
    91  	stateSourceObject.AfterLoad(func() { d.afterLoad(ctx) })
    92  }
    93  
    94  func (fd *directoryFD) StateTypeName() string {
    95  	return "pkg/sentry/fsimpl/gofer.directoryFD"
    96  }
    97  
    98  func (fd *directoryFD) StateFields() []string {
    99  	return []string{
   100  		"fileDescription",
   101  		"DirectoryFileDescriptionDefaultImpl",
   102  		"off",
   103  		"dirents",
   104  	}
   105  }
   106  
   107  func (fd *directoryFD) beforeSave() {}
   108  
   109  // +checklocksignore
   110  func (fd *directoryFD) StateSave(stateSinkObject state.Sink) {
   111  	fd.beforeSave()
   112  	stateSinkObject.Save(0, &fd.fileDescription)
   113  	stateSinkObject.Save(1, &fd.DirectoryFileDescriptionDefaultImpl)
   114  	stateSinkObject.Save(2, &fd.off)
   115  	stateSinkObject.Save(3, &fd.dirents)
   116  }
   117  
   118  func (fd *directoryFD) afterLoad(context.Context) {}
   119  
   120  // +checklocksignore
   121  func (fd *directoryFD) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   122  	stateSourceObject.Load(0, &fd.fileDescription)
   123  	stateSourceObject.Load(1, &fd.DirectoryFileDescriptionDefaultImpl)
   124  	stateSourceObject.Load(2, &fd.off)
   125  	stateSourceObject.Load(3, &fd.dirents)
   126  }
   127  
   128  func (cache *stringFixedCache) StateTypeName() string {
   129  	return "pkg/sentry/fsimpl/gofer.stringFixedCache"
   130  }
   131  
   132  func (cache *stringFixedCache) StateFields() []string {
   133  	return []string{
   134  		"namesList",
   135  		"size",
   136  	}
   137  }
   138  
   139  func (cache *stringFixedCache) beforeSave() {}
   140  
   141  // +checklocksignore
   142  func (cache *stringFixedCache) StateSave(stateSinkObject state.Sink) {
   143  	cache.beforeSave()
   144  	stateSinkObject.Save(0, &cache.namesList)
   145  	stateSinkObject.Save(1, &cache.size)
   146  }
   147  
   148  func (cache *stringFixedCache) afterLoad(context.Context) {}
   149  
   150  // +checklocksignore
   151  func (cache *stringFixedCache) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   152  	stateSourceObject.Load(0, &cache.namesList)
   153  	stateSourceObject.Load(1, &cache.size)
   154  }
   155  
   156  func (d *dentryCache) StateTypeName() string {
   157  	return "pkg/sentry/fsimpl/gofer.dentryCache"
   158  }
   159  
   160  func (d *dentryCache) StateFields() []string {
   161  	return []string{
   162  		"dentries",
   163  		"dentriesLen",
   164  		"maxCachedDentries",
   165  	}
   166  }
   167  
   168  func (d *dentryCache) beforeSave() {}
   169  
   170  // +checklocksignore
   171  func (d *dentryCache) StateSave(stateSinkObject state.Sink) {
   172  	d.beforeSave()
   173  	stateSinkObject.Save(0, &d.dentries)
   174  	stateSinkObject.Save(1, &d.dentriesLen)
   175  	stateSinkObject.Save(2, &d.maxCachedDentries)
   176  }
   177  
   178  func (d *dentryCache) afterLoad(context.Context) {}
   179  
   180  // +checklocksignore
   181  func (d *dentryCache) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   182  	stateSourceObject.Load(0, &d.dentries)
   183  	stateSourceObject.Load(1, &d.dentriesLen)
   184  	stateSourceObject.Load(2, &d.maxCachedDentries)
   185  }
   186  
   187  func (fstype *FilesystemType) StateTypeName() string {
   188  	return "pkg/sentry/fsimpl/gofer.FilesystemType"
   189  }
   190  
   191  func (fstype *FilesystemType) StateFields() []string {
   192  	return []string{}
   193  }
   194  
   195  func (fstype *FilesystemType) beforeSave() {}
   196  
   197  // +checklocksignore
   198  func (fstype *FilesystemType) StateSave(stateSinkObject state.Sink) {
   199  	fstype.beforeSave()
   200  }
   201  
   202  func (fstype *FilesystemType) afterLoad(context.Context) {}
   203  
   204  // +checklocksignore
   205  func (fstype *FilesystemType) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   206  }
   207  
   208  func (fs *filesystem) StateTypeName() string {
   209  	return "pkg/sentry/fsimpl/gofer.filesystem"
   210  }
   211  
   212  func (fs *filesystem) StateFields() []string {
   213  	return []string{
   214  		"vfsfs",
   215  		"opts",
   216  		"iopts",
   217  		"clock",
   218  		"devMinor",
   219  		"root",
   220  		"dentryCache",
   221  		"syncableDentries",
   222  		"specialFileFDs",
   223  		"lastIno",
   224  		"savedDentryRW",
   225  		"released",
   226  	}
   227  }
   228  
   229  func (fs *filesystem) beforeSave() {}
   230  
   231  // +checklocksignore
   232  func (fs *filesystem) StateSave(stateSinkObject state.Sink) {
   233  	fs.beforeSave()
   234  	stateSinkObject.Save(0, &fs.vfsfs)
   235  	stateSinkObject.Save(1, &fs.opts)
   236  	stateSinkObject.Save(2, &fs.iopts)
   237  	stateSinkObject.Save(3, &fs.clock)
   238  	stateSinkObject.Save(4, &fs.devMinor)
   239  	stateSinkObject.Save(5, &fs.root)
   240  	stateSinkObject.Save(6, &fs.dentryCache)
   241  	stateSinkObject.Save(7, &fs.syncableDentries)
   242  	stateSinkObject.Save(8, &fs.specialFileFDs)
   243  	stateSinkObject.Save(9, &fs.lastIno)
   244  	stateSinkObject.Save(10, &fs.savedDentryRW)
   245  	stateSinkObject.Save(11, &fs.released)
   246  }
   247  
   248  // +checklocksignore
   249  func (fs *filesystem) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   250  	stateSourceObject.Load(0, &fs.vfsfs)
   251  	stateSourceObject.Load(1, &fs.opts)
   252  	stateSourceObject.Load(2, &fs.iopts)
   253  	stateSourceObject.Load(3, &fs.clock)
   254  	stateSourceObject.Load(4, &fs.devMinor)
   255  	stateSourceObject.Load(5, &fs.root)
   256  	stateSourceObject.Load(6, &fs.dentryCache)
   257  	stateSourceObject.Load(7, &fs.syncableDentries)
   258  	stateSourceObject.Load(8, &fs.specialFileFDs)
   259  	stateSourceObject.Load(9, &fs.lastIno)
   260  	stateSourceObject.Load(10, &fs.savedDentryRW)
   261  	stateSourceObject.Load(11, &fs.released)
   262  	stateSourceObject.AfterLoad(func() { fs.afterLoad(ctx) })
   263  }
   264  
   265  func (f *filesystemOptions) StateTypeName() string {
   266  	return "pkg/sentry/fsimpl/gofer.filesystemOptions"
   267  }
   268  
   269  func (f *filesystemOptions) StateFields() []string {
   270  	return []string{
   271  		"fd",
   272  		"aname",
   273  		"interop",
   274  		"dfltuid",
   275  		"dfltgid",
   276  		"forcePageCache",
   277  		"limitHostFDTranslation",
   278  		"overlayfsStaleRead",
   279  		"regularFilesUseSpecialFileFD",
   280  		"disableFifoOpen",
   281  		"directfs",
   282  	}
   283  }
   284  
   285  func (f *filesystemOptions) beforeSave() {}
   286  
   287  // +checklocksignore
   288  func (f *filesystemOptions) StateSave(stateSinkObject state.Sink) {
   289  	f.beforeSave()
   290  	stateSinkObject.Save(0, &f.fd)
   291  	stateSinkObject.Save(1, &f.aname)
   292  	stateSinkObject.Save(2, &f.interop)
   293  	stateSinkObject.Save(3, &f.dfltuid)
   294  	stateSinkObject.Save(4, &f.dfltgid)
   295  	stateSinkObject.Save(5, &f.forcePageCache)
   296  	stateSinkObject.Save(6, &f.limitHostFDTranslation)
   297  	stateSinkObject.Save(7, &f.overlayfsStaleRead)
   298  	stateSinkObject.Save(8, &f.regularFilesUseSpecialFileFD)
   299  	stateSinkObject.Save(9, &f.disableFifoOpen)
   300  	stateSinkObject.Save(10, &f.directfs)
   301  }
   302  
   303  func (f *filesystemOptions) afterLoad(context.Context) {}
   304  
   305  // +checklocksignore
   306  func (f *filesystemOptions) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   307  	stateSourceObject.Load(0, &f.fd)
   308  	stateSourceObject.Load(1, &f.aname)
   309  	stateSourceObject.Load(2, &f.interop)
   310  	stateSourceObject.Load(3, &f.dfltuid)
   311  	stateSourceObject.Load(4, &f.dfltgid)
   312  	stateSourceObject.Load(5, &f.forcePageCache)
   313  	stateSourceObject.Load(6, &f.limitHostFDTranslation)
   314  	stateSourceObject.Load(7, &f.overlayfsStaleRead)
   315  	stateSourceObject.Load(8, &f.regularFilesUseSpecialFileFD)
   316  	stateSourceObject.Load(9, &f.disableFifoOpen)
   317  	stateSourceObject.Load(10, &f.directfs)
   318  }
   319  
   320  func (d *directfsOpts) StateTypeName() string {
   321  	return "pkg/sentry/fsimpl/gofer.directfsOpts"
   322  }
   323  
   324  func (d *directfsOpts) StateFields() []string {
   325  	return []string{
   326  		"enabled",
   327  	}
   328  }
   329  
   330  func (d *directfsOpts) beforeSave() {}
   331  
   332  // +checklocksignore
   333  func (d *directfsOpts) StateSave(stateSinkObject state.Sink) {
   334  	d.beforeSave()
   335  	stateSinkObject.Save(0, &d.enabled)
   336  }
   337  
   338  func (d *directfsOpts) afterLoad(context.Context) {}
   339  
   340  // +checklocksignore
   341  func (d *directfsOpts) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   342  	stateSourceObject.Load(0, &d.enabled)
   343  }
   344  
   345  func (i *InteropMode) StateTypeName() string {
   346  	return "pkg/sentry/fsimpl/gofer.InteropMode"
   347  }
   348  
   349  func (i *InteropMode) StateFields() []string {
   350  	return nil
   351  }
   352  
   353  func (i *InternalFilesystemOptions) StateTypeName() string {
   354  	return "pkg/sentry/fsimpl/gofer.InternalFilesystemOptions"
   355  }
   356  
   357  func (i *InternalFilesystemOptions) StateFields() []string {
   358  	return []string{
   359  		"UniqueID",
   360  		"LeakConnection",
   361  		"OpenSocketsByConnecting",
   362  	}
   363  }
   364  
   365  func (i *InternalFilesystemOptions) beforeSave() {}
   366  
   367  // +checklocksignore
   368  func (i *InternalFilesystemOptions) StateSave(stateSinkObject state.Sink) {
   369  	i.beforeSave()
   370  	stateSinkObject.Save(0, &i.UniqueID)
   371  	stateSinkObject.Save(1, &i.LeakConnection)
   372  	stateSinkObject.Save(2, &i.OpenSocketsByConnecting)
   373  }
   374  
   375  func (i *InternalFilesystemOptions) afterLoad(context.Context) {}
   376  
   377  // +checklocksignore
   378  func (i *InternalFilesystemOptions) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   379  	stateSourceObject.Load(0, &i.UniqueID)
   380  	stateSourceObject.Load(1, &i.LeakConnection)
   381  	stateSourceObject.Load(2, &i.OpenSocketsByConnecting)
   382  }
   383  
   384  func (i *inoKey) StateTypeName() string {
   385  	return "pkg/sentry/fsimpl/gofer.inoKey"
   386  }
   387  
   388  func (i *inoKey) StateFields() []string {
   389  	return []string{
   390  		"ino",
   391  		"devMinor",
   392  		"devMajor",
   393  	}
   394  }
   395  
   396  func (i *inoKey) beforeSave() {}
   397  
   398  // +checklocksignore
   399  func (i *inoKey) StateSave(stateSinkObject state.Sink) {
   400  	i.beforeSave()
   401  	stateSinkObject.Save(0, &i.ino)
   402  	stateSinkObject.Save(1, &i.devMinor)
   403  	stateSinkObject.Save(2, &i.devMajor)
   404  }
   405  
   406  func (i *inoKey) afterLoad(context.Context) {}
   407  
   408  // +checklocksignore
   409  func (i *inoKey) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   410  	stateSourceObject.Load(0, &i.ino)
   411  	stateSourceObject.Load(1, &i.devMinor)
   412  	stateSourceObject.Load(2, &i.devMajor)
   413  }
   414  
   415  func (d *dentry) StateTypeName() string {
   416  	return "pkg/sentry/fsimpl/gofer.dentry"
   417  }
   418  
   419  func (d *dentry) StateFields() []string {
   420  	return []string{
   421  		"vfsd",
   422  		"refs",
   423  		"fs",
   424  		"parent",
   425  		"name",
   426  		"inoKey",
   427  		"deleted",
   428  		"cached",
   429  		"cacheEntry",
   430  		"syncableListEntry",
   431  		"children",
   432  		"syntheticChildren",
   433  		"ino",
   434  		"mode",
   435  		"uid",
   436  		"gid",
   437  		"blockSize",
   438  		"atime",
   439  		"mtime",
   440  		"ctime",
   441  		"btime",
   442  		"size",
   443  		"atimeDirty",
   444  		"mtimeDirty",
   445  		"nlink",
   446  		"mappings",
   447  		"cache",
   448  		"dirty",
   449  		"pf",
   450  		"haveTarget",
   451  		"target",
   452  		"endpoint",
   453  		"pipe",
   454  		"locks",
   455  		"watches",
   456  		"impl",
   457  	}
   458  }
   459  
   460  // +checklocksignore
   461  func (d *dentry) StateSave(stateSinkObject state.Sink) {
   462  	d.beforeSave()
   463  	var parentValue *dentry
   464  	parentValue = d.saveParent()
   465  	stateSinkObject.SaveValue(3, parentValue)
   466  	stateSinkObject.Save(0, &d.vfsd)
   467  	stateSinkObject.Save(1, &d.refs)
   468  	stateSinkObject.Save(2, &d.fs)
   469  	stateSinkObject.Save(4, &d.name)
   470  	stateSinkObject.Save(5, &d.inoKey)
   471  	stateSinkObject.Save(6, &d.deleted)
   472  	stateSinkObject.Save(7, &d.cached)
   473  	stateSinkObject.Save(8, &d.cacheEntry)
   474  	stateSinkObject.Save(9, &d.syncableListEntry)
   475  	stateSinkObject.Save(10, &d.children)
   476  	stateSinkObject.Save(11, &d.syntheticChildren)
   477  	stateSinkObject.Save(12, &d.ino)
   478  	stateSinkObject.Save(13, &d.mode)
   479  	stateSinkObject.Save(14, &d.uid)
   480  	stateSinkObject.Save(15, &d.gid)
   481  	stateSinkObject.Save(16, &d.blockSize)
   482  	stateSinkObject.Save(17, &d.atime)
   483  	stateSinkObject.Save(18, &d.mtime)
   484  	stateSinkObject.Save(19, &d.ctime)
   485  	stateSinkObject.Save(20, &d.btime)
   486  	stateSinkObject.Save(21, &d.size)
   487  	stateSinkObject.Save(22, &d.atimeDirty)
   488  	stateSinkObject.Save(23, &d.mtimeDirty)
   489  	stateSinkObject.Save(24, &d.nlink)
   490  	stateSinkObject.Save(25, &d.mappings)
   491  	stateSinkObject.Save(26, &d.cache)
   492  	stateSinkObject.Save(27, &d.dirty)
   493  	stateSinkObject.Save(28, &d.pf)
   494  	stateSinkObject.Save(29, &d.haveTarget)
   495  	stateSinkObject.Save(30, &d.target)
   496  	stateSinkObject.Save(31, &d.endpoint)
   497  	stateSinkObject.Save(32, &d.pipe)
   498  	stateSinkObject.Save(33, &d.locks)
   499  	stateSinkObject.Save(34, &d.watches)
   500  	stateSinkObject.Save(35, &d.impl)
   501  }
   502  
   503  // +checklocksignore
   504  func (d *dentry) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   505  	stateSourceObject.Load(0, &d.vfsd)
   506  	stateSourceObject.Load(1, &d.refs)
   507  	stateSourceObject.Load(2, &d.fs)
   508  	stateSourceObject.Load(4, &d.name)
   509  	stateSourceObject.Load(5, &d.inoKey)
   510  	stateSourceObject.Load(6, &d.deleted)
   511  	stateSourceObject.Load(7, &d.cached)
   512  	stateSourceObject.Load(8, &d.cacheEntry)
   513  	stateSourceObject.Load(9, &d.syncableListEntry)
   514  	stateSourceObject.Load(10, &d.children)
   515  	stateSourceObject.Load(11, &d.syntheticChildren)
   516  	stateSourceObject.Load(12, &d.ino)
   517  	stateSourceObject.Load(13, &d.mode)
   518  	stateSourceObject.Load(14, &d.uid)
   519  	stateSourceObject.Load(15, &d.gid)
   520  	stateSourceObject.Load(16, &d.blockSize)
   521  	stateSourceObject.Load(17, &d.atime)
   522  	stateSourceObject.Load(18, &d.mtime)
   523  	stateSourceObject.Load(19, &d.ctime)
   524  	stateSourceObject.Load(20, &d.btime)
   525  	stateSourceObject.Load(21, &d.size)
   526  	stateSourceObject.Load(22, &d.atimeDirty)
   527  	stateSourceObject.Load(23, &d.mtimeDirty)
   528  	stateSourceObject.Load(24, &d.nlink)
   529  	stateSourceObject.Load(25, &d.mappings)
   530  	stateSourceObject.Load(26, &d.cache)
   531  	stateSourceObject.Load(27, &d.dirty)
   532  	stateSourceObject.Load(28, &d.pf)
   533  	stateSourceObject.Load(29, &d.haveTarget)
   534  	stateSourceObject.Load(30, &d.target)
   535  	stateSourceObject.Load(31, &d.endpoint)
   536  	stateSourceObject.Load(32, &d.pipe)
   537  	stateSourceObject.Load(33, &d.locks)
   538  	stateSourceObject.Load(34, &d.watches)
   539  	stateSourceObject.Load(35, &d.impl)
   540  	stateSourceObject.LoadValue(3, new(*dentry), func(y any) { d.loadParent(ctx, y.(*dentry)) })
   541  	stateSourceObject.AfterLoad(func() { d.afterLoad(ctx) })
   542  }
   543  
   544  func (s *stringListElem) StateTypeName() string {
   545  	return "pkg/sentry/fsimpl/gofer.stringListElem"
   546  }
   547  
   548  func (s *stringListElem) StateFields() []string {
   549  	return []string{
   550  		"str",
   551  		"stringEntry",
   552  	}
   553  }
   554  
   555  func (s *stringListElem) beforeSave() {}
   556  
   557  // +checklocksignore
   558  func (s *stringListElem) StateSave(stateSinkObject state.Sink) {
   559  	s.beforeSave()
   560  	stateSinkObject.Save(0, &s.str)
   561  	stateSinkObject.Save(1, &s.stringEntry)
   562  }
   563  
   564  func (s *stringListElem) afterLoad(context.Context) {}
   565  
   566  // +checklocksignore
   567  func (s *stringListElem) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   568  	stateSourceObject.Load(0, &s.str)
   569  	stateSourceObject.Load(1, &s.stringEntry)
   570  }
   571  
   572  func (d *dentryListElem) StateTypeName() string {
   573  	return "pkg/sentry/fsimpl/gofer.dentryListElem"
   574  }
   575  
   576  func (d *dentryListElem) StateFields() []string {
   577  	return []string{
   578  		"d",
   579  		"dentryEntry",
   580  	}
   581  }
   582  
   583  func (d *dentryListElem) beforeSave() {}
   584  
   585  // +checklocksignore
   586  func (d *dentryListElem) StateSave(stateSinkObject state.Sink) {
   587  	d.beforeSave()
   588  	stateSinkObject.Save(0, &d.d)
   589  	stateSinkObject.Save(1, &d.dentryEntry)
   590  }
   591  
   592  func (d *dentryListElem) afterLoad(context.Context) {}
   593  
   594  // +checklocksignore
   595  func (d *dentryListElem) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   596  	stateSourceObject.Load(0, &d.d)
   597  	stateSourceObject.Load(1, &d.dentryEntry)
   598  }
   599  
   600  func (fd *fileDescription) StateTypeName() string {
   601  	return "pkg/sentry/fsimpl/gofer.fileDescription"
   602  }
   603  
   604  func (fd *fileDescription) StateFields() []string {
   605  	return []string{
   606  		"vfsfd",
   607  		"FileDescriptionDefaultImpl",
   608  		"LockFD",
   609  	}
   610  }
   611  
   612  func (fd *fileDescription) beforeSave() {}
   613  
   614  // +checklocksignore
   615  func (fd *fileDescription) StateSave(stateSinkObject state.Sink) {
   616  	fd.beforeSave()
   617  	stateSinkObject.Save(0, &fd.vfsfd)
   618  	stateSinkObject.Save(1, &fd.FileDescriptionDefaultImpl)
   619  	stateSinkObject.Save(2, &fd.LockFD)
   620  }
   621  
   622  func (fd *fileDescription) afterLoad(context.Context) {}
   623  
   624  // +checklocksignore
   625  func (fd *fileDescription) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   626  	stateSourceObject.Load(0, &fd.vfsfd)
   627  	stateSourceObject.Load(1, &fd.FileDescriptionDefaultImpl)
   628  	stateSourceObject.Load(2, &fd.LockFD)
   629  }
   630  
   631  func (d *lisafsDentry) StateTypeName() string {
   632  	return "pkg/sentry/fsimpl/gofer.lisafsDentry"
   633  }
   634  
   635  func (d *lisafsDentry) StateFields() []string {
   636  	return []string{
   637  		"dentry",
   638  	}
   639  }
   640  
   641  func (d *lisafsDentry) beforeSave() {}
   642  
   643  // +checklocksignore
   644  func (d *lisafsDentry) StateSave(stateSinkObject state.Sink) {
   645  	d.beforeSave()
   646  	stateSinkObject.Save(0, &d.dentry)
   647  }
   648  
   649  func (d *lisafsDentry) afterLoad(context.Context) {}
   650  
   651  // +checklocksignore
   652  func (d *lisafsDentry) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   653  	stateSourceObject.Load(0, &d.dentry)
   654  }
   655  
   656  func (fd *regularFileFD) StateTypeName() string {
   657  	return "pkg/sentry/fsimpl/gofer.regularFileFD"
   658  }
   659  
   660  func (fd *regularFileFD) StateFields() []string {
   661  	return []string{
   662  		"fileDescription",
   663  		"off",
   664  	}
   665  }
   666  
   667  func (fd *regularFileFD) beforeSave() {}
   668  
   669  // +checklocksignore
   670  func (fd *regularFileFD) StateSave(stateSinkObject state.Sink) {
   671  	fd.beforeSave()
   672  	stateSinkObject.Save(0, &fd.fileDescription)
   673  	stateSinkObject.Save(1, &fd.off)
   674  }
   675  
   676  func (fd *regularFileFD) afterLoad(context.Context) {}
   677  
   678  // +checklocksignore
   679  func (fd *regularFileFD) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   680  	stateSourceObject.Load(0, &fd.fileDescription)
   681  	stateSourceObject.Load(1, &fd.off)
   682  }
   683  
   684  func (d *dentryPlatformFile) StateTypeName() string {
   685  	return "pkg/sentry/fsimpl/gofer.dentryPlatformFile"
   686  }
   687  
   688  func (d *dentryPlatformFile) StateFields() []string {
   689  	return []string{
   690  		"dentry",
   691  		"fdRefs",
   692  		"hostFileMapper",
   693  	}
   694  }
   695  
   696  func (d *dentryPlatformFile) beforeSave() {}
   697  
   698  // +checklocksignore
   699  func (d *dentryPlatformFile) StateSave(stateSinkObject state.Sink) {
   700  	d.beforeSave()
   701  	stateSinkObject.Save(0, &d.dentry)
   702  	stateSinkObject.Save(1, &d.fdRefs)
   703  	stateSinkObject.Save(2, &d.hostFileMapper)
   704  }
   705  
   706  // +checklocksignore
   707  func (d *dentryPlatformFile) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   708  	stateSourceObject.Load(0, &d.dentry)
   709  	stateSourceObject.Load(1, &d.fdRefs)
   710  	stateSourceObject.Load(2, &d.hostFileMapper)
   711  	stateSourceObject.AfterLoad(func() { d.afterLoad(ctx) })
   712  }
   713  
   714  func (s *savedDentryRW) StateTypeName() string {
   715  	return "pkg/sentry/fsimpl/gofer.savedDentryRW"
   716  }
   717  
   718  func (s *savedDentryRW) StateFields() []string {
   719  	return []string{
   720  		"read",
   721  		"write",
   722  	}
   723  }
   724  
   725  func (s *savedDentryRW) beforeSave() {}
   726  
   727  // +checklocksignore
   728  func (s *savedDentryRW) StateSave(stateSinkObject state.Sink) {
   729  	s.beforeSave()
   730  	stateSinkObject.Save(0, &s.read)
   731  	stateSinkObject.Save(1, &s.write)
   732  }
   733  
   734  func (s *savedDentryRW) afterLoad(context.Context) {}
   735  
   736  // +checklocksignore
   737  func (s *savedDentryRW) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   738  	stateSourceObject.Load(0, &s.read)
   739  	stateSourceObject.Load(1, &s.write)
   740  }
   741  
   742  func (e *endpoint) StateTypeName() string {
   743  	return "pkg/sentry/fsimpl/gofer.endpoint"
   744  }
   745  
   746  func (e *endpoint) StateFields() []string {
   747  	return []string{
   748  		"dentry",
   749  		"path",
   750  	}
   751  }
   752  
   753  func (e *endpoint) beforeSave() {}
   754  
   755  // +checklocksignore
   756  func (e *endpoint) StateSave(stateSinkObject state.Sink) {
   757  	e.beforeSave()
   758  	stateSinkObject.Save(0, &e.dentry)
   759  	stateSinkObject.Save(1, &e.path)
   760  }
   761  
   762  func (e *endpoint) afterLoad(context.Context) {}
   763  
   764  // +checklocksignore
   765  func (e *endpoint) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   766  	stateSourceObject.Load(0, &e.dentry)
   767  	stateSourceObject.Load(1, &e.path)
   768  }
   769  
   770  func (l *specialFDList) StateTypeName() string {
   771  	return "pkg/sentry/fsimpl/gofer.specialFDList"
   772  }
   773  
   774  func (l *specialFDList) StateFields() []string {
   775  	return []string{
   776  		"head",
   777  		"tail",
   778  	}
   779  }
   780  
   781  func (l *specialFDList) beforeSave() {}
   782  
   783  // +checklocksignore
   784  func (l *specialFDList) StateSave(stateSinkObject state.Sink) {
   785  	l.beforeSave()
   786  	stateSinkObject.Save(0, &l.head)
   787  	stateSinkObject.Save(1, &l.tail)
   788  }
   789  
   790  func (l *specialFDList) afterLoad(context.Context) {}
   791  
   792  // +checklocksignore
   793  func (l *specialFDList) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   794  	stateSourceObject.Load(0, &l.head)
   795  	stateSourceObject.Load(1, &l.tail)
   796  }
   797  
   798  func (e *specialFDEntry) StateTypeName() string {
   799  	return "pkg/sentry/fsimpl/gofer.specialFDEntry"
   800  }
   801  
   802  func (e *specialFDEntry) StateFields() []string {
   803  	return []string{
   804  		"next",
   805  		"prev",
   806  	}
   807  }
   808  
   809  func (e *specialFDEntry) beforeSave() {}
   810  
   811  // +checklocksignore
   812  func (e *specialFDEntry) StateSave(stateSinkObject state.Sink) {
   813  	e.beforeSave()
   814  	stateSinkObject.Save(0, &e.next)
   815  	stateSinkObject.Save(1, &e.prev)
   816  }
   817  
   818  func (e *specialFDEntry) afterLoad(context.Context) {}
   819  
   820  // +checklocksignore
   821  func (e *specialFDEntry) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   822  	stateSourceObject.Load(0, &e.next)
   823  	stateSourceObject.Load(1, &e.prev)
   824  }
   825  
   826  func (fd *specialFileFD) StateTypeName() string {
   827  	return "pkg/sentry/fsimpl/gofer.specialFileFD"
   828  }
   829  
   830  func (fd *specialFileFD) StateFields() []string {
   831  	return []string{
   832  		"fileDescription",
   833  		"specialFDEntry",
   834  		"isRegularFile",
   835  		"seekable",
   836  		"queue",
   837  		"off",
   838  		"haveBuf",
   839  		"buf",
   840  		"hostFileMapper",
   841  		"fileRefs",
   842  	}
   843  }
   844  
   845  func (fd *specialFileFD) beforeSave() {}
   846  
   847  // +checklocksignore
   848  func (fd *specialFileFD) StateSave(stateSinkObject state.Sink) {
   849  	fd.beforeSave()
   850  	stateSinkObject.Save(0, &fd.fileDescription)
   851  	stateSinkObject.Save(1, &fd.specialFDEntry)
   852  	stateSinkObject.Save(2, &fd.isRegularFile)
   853  	stateSinkObject.Save(3, &fd.seekable)
   854  	stateSinkObject.Save(4, &fd.queue)
   855  	stateSinkObject.Save(5, &fd.off)
   856  	stateSinkObject.Save(6, &fd.haveBuf)
   857  	stateSinkObject.Save(7, &fd.buf)
   858  	stateSinkObject.Save(8, &fd.hostFileMapper)
   859  	stateSinkObject.Save(9, &fd.fileRefs)
   860  }
   861  
   862  // +checklocksignore
   863  func (fd *specialFileFD) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   864  	stateSourceObject.Load(0, &fd.fileDescription)
   865  	stateSourceObject.Load(1, &fd.specialFDEntry)
   866  	stateSourceObject.Load(2, &fd.isRegularFile)
   867  	stateSourceObject.Load(3, &fd.seekable)
   868  	stateSourceObject.Load(4, &fd.queue)
   869  	stateSourceObject.Load(5, &fd.off)
   870  	stateSourceObject.Load(6, &fd.haveBuf)
   871  	stateSourceObject.Load(7, &fd.buf)
   872  	stateSourceObject.Load(8, &fd.hostFileMapper)
   873  	stateSourceObject.Load(9, &fd.fileRefs)
   874  	stateSourceObject.AfterLoad(func() { fd.afterLoad(ctx) })
   875  }
   876  
   877  func (l *stringList) StateTypeName() string {
   878  	return "pkg/sentry/fsimpl/gofer.stringList"
   879  }
   880  
   881  func (l *stringList) StateFields() []string {
   882  	return []string{
   883  		"head",
   884  		"tail",
   885  	}
   886  }
   887  
   888  func (l *stringList) beforeSave() {}
   889  
   890  // +checklocksignore
   891  func (l *stringList) StateSave(stateSinkObject state.Sink) {
   892  	l.beforeSave()
   893  	stateSinkObject.Save(0, &l.head)
   894  	stateSinkObject.Save(1, &l.tail)
   895  }
   896  
   897  func (l *stringList) afterLoad(context.Context) {}
   898  
   899  // +checklocksignore
   900  func (l *stringList) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   901  	stateSourceObject.Load(0, &l.head)
   902  	stateSourceObject.Load(1, &l.tail)
   903  }
   904  
   905  func (e *stringEntry) StateTypeName() string {
   906  	return "pkg/sentry/fsimpl/gofer.stringEntry"
   907  }
   908  
   909  func (e *stringEntry) StateFields() []string {
   910  	return []string{
   911  		"next",
   912  		"prev",
   913  	}
   914  }
   915  
   916  func (e *stringEntry) beforeSave() {}
   917  
   918  // +checklocksignore
   919  func (e *stringEntry) StateSave(stateSinkObject state.Sink) {
   920  	e.beforeSave()
   921  	stateSinkObject.Save(0, &e.next)
   922  	stateSinkObject.Save(1, &e.prev)
   923  }
   924  
   925  func (e *stringEntry) afterLoad(context.Context) {}
   926  
   927  // +checklocksignore
   928  func (e *stringEntry) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   929  	stateSourceObject.Load(0, &e.next)
   930  	stateSourceObject.Load(1, &e.prev)
   931  }
   932  
   933  func init() {
   934  	state.Register((*dentryList)(nil))
   935  	state.Register((*dentryEntry)(nil))
   936  	state.Register((*directfsDentry)(nil))
   937  	state.Register((*directoryFD)(nil))
   938  	state.Register((*stringFixedCache)(nil))
   939  	state.Register((*dentryCache)(nil))
   940  	state.Register((*FilesystemType)(nil))
   941  	state.Register((*filesystem)(nil))
   942  	state.Register((*filesystemOptions)(nil))
   943  	state.Register((*directfsOpts)(nil))
   944  	state.Register((*InteropMode)(nil))
   945  	state.Register((*InternalFilesystemOptions)(nil))
   946  	state.Register((*inoKey)(nil))
   947  	state.Register((*dentry)(nil))
   948  	state.Register((*stringListElem)(nil))
   949  	state.Register((*dentryListElem)(nil))
   950  	state.Register((*fileDescription)(nil))
   951  	state.Register((*lisafsDentry)(nil))
   952  	state.Register((*regularFileFD)(nil))
   953  	state.Register((*dentryPlatformFile)(nil))
   954  	state.Register((*savedDentryRW)(nil))
   955  	state.Register((*endpoint)(nil))
   956  	state.Register((*specialFDList)(nil))
   957  	state.Register((*specialFDEntry)(nil))
   958  	state.Register((*specialFileFD)(nil))
   959  	state.Register((*stringList)(nil))
   960  	state.Register((*stringEntry)(nil))
   961  }