github.com/metacubex/gvisor@v0.0.0-20240320004321-933faba989ec/pkg/sentry/vfs/vfs_state_autogen.go (about)

     1  // automatically generated by stateify.
     2  
     3  //go:build !check_invariants
     4  // +build !check_invariants
     5  
     6  package vfs
     7  
     8  import (
     9  	"context"
    10  
    11  	"github.com/metacubex/gvisor/pkg/state"
    12  )
    13  
    14  func (a *anonFilesystemType) StateTypeName() string {
    15  	return "pkg/sentry/vfs.anonFilesystemType"
    16  }
    17  
    18  func (a *anonFilesystemType) StateFields() []string {
    19  	return []string{}
    20  }
    21  
    22  func (a *anonFilesystemType) beforeSave() {}
    23  
    24  // +checklocksignore
    25  func (a *anonFilesystemType) StateSave(stateSinkObject state.Sink) {
    26  	a.beforeSave()
    27  }
    28  
    29  func (a *anonFilesystemType) afterLoad(context.Context) {}
    30  
    31  // +checklocksignore
    32  func (a *anonFilesystemType) StateLoad(ctx context.Context, stateSourceObject state.Source) {
    33  }
    34  
    35  func (fs *anonFilesystem) StateTypeName() string {
    36  	return "pkg/sentry/vfs.anonFilesystem"
    37  }
    38  
    39  func (fs *anonFilesystem) StateFields() []string {
    40  	return []string{
    41  		"vfsfs",
    42  		"devMinor",
    43  	}
    44  }
    45  
    46  func (fs *anonFilesystem) beforeSave() {}
    47  
    48  // +checklocksignore
    49  func (fs *anonFilesystem) StateSave(stateSinkObject state.Sink) {
    50  	fs.beforeSave()
    51  	stateSinkObject.Save(0, &fs.vfsfs)
    52  	stateSinkObject.Save(1, &fs.devMinor)
    53  }
    54  
    55  func (fs *anonFilesystem) afterLoad(context.Context) {}
    56  
    57  // +checklocksignore
    58  func (fs *anonFilesystem) StateLoad(ctx context.Context, stateSourceObject state.Source) {
    59  	stateSourceObject.Load(0, &fs.vfsfs)
    60  	stateSourceObject.Load(1, &fs.devMinor)
    61  }
    62  
    63  func (d *anonDentry) StateTypeName() string {
    64  	return "pkg/sentry/vfs.anonDentry"
    65  }
    66  
    67  func (d *anonDentry) StateFields() []string {
    68  	return []string{
    69  		"vfsd",
    70  		"name",
    71  		"watches",
    72  	}
    73  }
    74  
    75  func (d *anonDentry) beforeSave() {}
    76  
    77  // +checklocksignore
    78  func (d *anonDentry) StateSave(stateSinkObject state.Sink) {
    79  	d.beforeSave()
    80  	stateSinkObject.Save(0, &d.vfsd)
    81  	stateSinkObject.Save(1, &d.name)
    82  	stateSinkObject.Save(2, &d.watches)
    83  }
    84  
    85  func (d *anonDentry) afterLoad(context.Context) {}
    86  
    87  // +checklocksignore
    88  func (d *anonDentry) StateLoad(ctx context.Context, stateSourceObject state.Source) {
    89  	stateSourceObject.Load(0, &d.vfsd)
    90  	stateSourceObject.Load(1, &d.name)
    91  	stateSourceObject.Load(2, &d.watches)
    92  }
    93  
    94  func (d *Dentry) StateTypeName() string {
    95  	return "pkg/sentry/vfs.Dentry"
    96  }
    97  
    98  func (d *Dentry) StateFields() []string {
    99  	return []string{
   100  		"dead",
   101  		"evictable",
   102  		"mounts",
   103  		"impl",
   104  	}
   105  }
   106  
   107  func (d *Dentry) beforeSave() {}
   108  
   109  // +checklocksignore
   110  func (d *Dentry) StateSave(stateSinkObject state.Sink) {
   111  	d.beforeSave()
   112  	stateSinkObject.Save(0, &d.dead)
   113  	stateSinkObject.Save(1, &d.evictable)
   114  	stateSinkObject.Save(2, &d.mounts)
   115  	stateSinkObject.Save(3, &d.impl)
   116  }
   117  
   118  func (d *Dentry) afterLoad(context.Context) {}
   119  
   120  // +checklocksignore
   121  func (d *Dentry) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   122  	stateSourceObject.Load(0, &d.dead)
   123  	stateSourceObject.Load(1, &d.evictable)
   124  	stateSourceObject.Load(2, &d.mounts)
   125  	stateSourceObject.Load(3, &d.impl)
   126  }
   127  
   128  func (kind *DeviceKind) StateTypeName() string {
   129  	return "pkg/sentry/vfs.DeviceKind"
   130  }
   131  
   132  func (kind *DeviceKind) StateFields() []string {
   133  	return nil
   134  }
   135  
   136  func (d *devTuple) StateTypeName() string {
   137  	return "pkg/sentry/vfs.devTuple"
   138  }
   139  
   140  func (d *devTuple) StateFields() []string {
   141  	return []string{
   142  		"kind",
   143  		"major",
   144  		"minor",
   145  	}
   146  }
   147  
   148  func (d *devTuple) beforeSave() {}
   149  
   150  // +checklocksignore
   151  func (d *devTuple) StateSave(stateSinkObject state.Sink) {
   152  	d.beforeSave()
   153  	stateSinkObject.Save(0, &d.kind)
   154  	stateSinkObject.Save(1, &d.major)
   155  	stateSinkObject.Save(2, &d.minor)
   156  }
   157  
   158  func (d *devTuple) afterLoad(context.Context) {}
   159  
   160  // +checklocksignore
   161  func (d *devTuple) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   162  	stateSourceObject.Load(0, &d.kind)
   163  	stateSourceObject.Load(1, &d.major)
   164  	stateSourceObject.Load(2, &d.minor)
   165  }
   166  
   167  func (r *registeredDevice) StateTypeName() string {
   168  	return "pkg/sentry/vfs.registeredDevice"
   169  }
   170  
   171  func (r *registeredDevice) StateFields() []string {
   172  	return []string{
   173  		"dev",
   174  		"opts",
   175  	}
   176  }
   177  
   178  func (r *registeredDevice) beforeSave() {}
   179  
   180  // +checklocksignore
   181  func (r *registeredDevice) StateSave(stateSinkObject state.Sink) {
   182  	r.beforeSave()
   183  	stateSinkObject.Save(0, &r.dev)
   184  	stateSinkObject.Save(1, &r.opts)
   185  }
   186  
   187  func (r *registeredDevice) afterLoad(context.Context) {}
   188  
   189  // +checklocksignore
   190  func (r *registeredDevice) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   191  	stateSourceObject.Load(0, &r.dev)
   192  	stateSourceObject.Load(1, &r.opts)
   193  }
   194  
   195  func (r *RegisterDeviceOptions) StateTypeName() string {
   196  	return "pkg/sentry/vfs.RegisterDeviceOptions"
   197  }
   198  
   199  func (r *RegisterDeviceOptions) StateFields() []string {
   200  	return []string{
   201  		"GroupName",
   202  		"Pathname",
   203  		"FilePerms",
   204  	}
   205  }
   206  
   207  func (r *RegisterDeviceOptions) beforeSave() {}
   208  
   209  // +checklocksignore
   210  func (r *RegisterDeviceOptions) StateSave(stateSinkObject state.Sink) {
   211  	r.beforeSave()
   212  	stateSinkObject.Save(0, &r.GroupName)
   213  	stateSinkObject.Save(1, &r.Pathname)
   214  	stateSinkObject.Save(2, &r.FilePerms)
   215  }
   216  
   217  func (r *RegisterDeviceOptions) afterLoad(context.Context) {}
   218  
   219  // +checklocksignore
   220  func (r *RegisterDeviceOptions) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   221  	stateSourceObject.Load(0, &r.GroupName)
   222  	stateSourceObject.Load(1, &r.Pathname)
   223  	stateSourceObject.Load(2, &r.FilePerms)
   224  }
   225  
   226  func (ep *EpollInstance) StateTypeName() string {
   227  	return "pkg/sentry/vfs.EpollInstance"
   228  }
   229  
   230  func (ep *EpollInstance) StateFields() []string {
   231  	return []string{
   232  		"vfsfd",
   233  		"FileDescriptionDefaultImpl",
   234  		"DentryMetadataFileDescriptionImpl",
   235  		"NoLockFD",
   236  		"q",
   237  		"interest",
   238  		"ready",
   239  		"readySeq",
   240  	}
   241  }
   242  
   243  func (ep *EpollInstance) beforeSave() {}
   244  
   245  // +checklocksignore
   246  func (ep *EpollInstance) StateSave(stateSinkObject state.Sink) {
   247  	ep.beforeSave()
   248  	stateSinkObject.Save(0, &ep.vfsfd)
   249  	stateSinkObject.Save(1, &ep.FileDescriptionDefaultImpl)
   250  	stateSinkObject.Save(2, &ep.DentryMetadataFileDescriptionImpl)
   251  	stateSinkObject.Save(3, &ep.NoLockFD)
   252  	stateSinkObject.Save(4, &ep.q)
   253  	stateSinkObject.Save(5, &ep.interest)
   254  	stateSinkObject.Save(6, &ep.ready)
   255  	stateSinkObject.Save(7, &ep.readySeq)
   256  }
   257  
   258  func (ep *EpollInstance) afterLoad(context.Context) {}
   259  
   260  // +checklocksignore
   261  func (ep *EpollInstance) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   262  	stateSourceObject.Load(0, &ep.vfsfd)
   263  	stateSourceObject.Load(1, &ep.FileDescriptionDefaultImpl)
   264  	stateSourceObject.Load(2, &ep.DentryMetadataFileDescriptionImpl)
   265  	stateSourceObject.Load(3, &ep.NoLockFD)
   266  	stateSourceObject.Load(4, &ep.q)
   267  	stateSourceObject.Load(5, &ep.interest)
   268  	stateSourceObject.Load(6, &ep.ready)
   269  	stateSourceObject.Load(7, &ep.readySeq)
   270  }
   271  
   272  func (e *epollInterestKey) StateTypeName() string {
   273  	return "pkg/sentry/vfs.epollInterestKey"
   274  }
   275  
   276  func (e *epollInterestKey) StateFields() []string {
   277  	return []string{
   278  		"file",
   279  		"num",
   280  	}
   281  }
   282  
   283  func (e *epollInterestKey) beforeSave() {}
   284  
   285  // +checklocksignore
   286  func (e *epollInterestKey) StateSave(stateSinkObject state.Sink) {
   287  	e.beforeSave()
   288  	stateSinkObject.Save(0, &e.file)
   289  	stateSinkObject.Save(1, &e.num)
   290  }
   291  
   292  func (e *epollInterestKey) afterLoad(context.Context) {}
   293  
   294  // +checklocksignore
   295  func (e *epollInterestKey) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   296  	stateSourceObject.Load(0, &e.file)
   297  	stateSourceObject.Load(1, &e.num)
   298  }
   299  
   300  func (epi *epollInterest) StateTypeName() string {
   301  	return "pkg/sentry/vfs.epollInterest"
   302  }
   303  
   304  func (epi *epollInterest) StateFields() []string {
   305  	return []string{
   306  		"epoll",
   307  		"key",
   308  		"waiter",
   309  		"mask",
   310  		"ready",
   311  		"epollInterestEntry",
   312  		"readySeq",
   313  		"userData",
   314  	}
   315  }
   316  
   317  func (epi *epollInterest) beforeSave() {}
   318  
   319  // +checklocksignore
   320  func (epi *epollInterest) StateSave(stateSinkObject state.Sink) {
   321  	epi.beforeSave()
   322  	stateSinkObject.Save(0, &epi.epoll)
   323  	stateSinkObject.Save(1, &epi.key)
   324  	stateSinkObject.Save(2, &epi.waiter)
   325  	stateSinkObject.Save(3, &epi.mask)
   326  	stateSinkObject.Save(4, &epi.ready)
   327  	stateSinkObject.Save(5, &epi.epollInterestEntry)
   328  	stateSinkObject.Save(6, &epi.readySeq)
   329  	stateSinkObject.Save(7, &epi.userData)
   330  }
   331  
   332  // +checklocksignore
   333  func (epi *epollInterest) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   334  	stateSourceObject.LoadWait(0, &epi.epoll)
   335  	stateSourceObject.Load(1, &epi.key)
   336  	stateSourceObject.Load(2, &epi.waiter)
   337  	stateSourceObject.Load(3, &epi.mask)
   338  	stateSourceObject.Load(4, &epi.ready)
   339  	stateSourceObject.Load(5, &epi.epollInterestEntry)
   340  	stateSourceObject.Load(6, &epi.readySeq)
   341  	stateSourceObject.Load(7, &epi.userData)
   342  	stateSourceObject.AfterLoad(func() { epi.afterLoad(ctx) })
   343  }
   344  
   345  func (l *epollInterestList) StateTypeName() string {
   346  	return "pkg/sentry/vfs.epollInterestList"
   347  }
   348  
   349  func (l *epollInterestList) StateFields() []string {
   350  	return []string{
   351  		"head",
   352  		"tail",
   353  	}
   354  }
   355  
   356  func (l *epollInterestList) beforeSave() {}
   357  
   358  // +checklocksignore
   359  func (l *epollInterestList) StateSave(stateSinkObject state.Sink) {
   360  	l.beforeSave()
   361  	stateSinkObject.Save(0, &l.head)
   362  	stateSinkObject.Save(1, &l.tail)
   363  }
   364  
   365  func (l *epollInterestList) afterLoad(context.Context) {}
   366  
   367  // +checklocksignore
   368  func (l *epollInterestList) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   369  	stateSourceObject.Load(0, &l.head)
   370  	stateSourceObject.Load(1, &l.tail)
   371  }
   372  
   373  func (e *epollInterestEntry) StateTypeName() string {
   374  	return "pkg/sentry/vfs.epollInterestEntry"
   375  }
   376  
   377  func (e *epollInterestEntry) StateFields() []string {
   378  	return []string{
   379  		"next",
   380  		"prev",
   381  	}
   382  }
   383  
   384  func (e *epollInterestEntry) beforeSave() {}
   385  
   386  // +checklocksignore
   387  func (e *epollInterestEntry) StateSave(stateSinkObject state.Sink) {
   388  	e.beforeSave()
   389  	stateSinkObject.Save(0, &e.next)
   390  	stateSinkObject.Save(1, &e.prev)
   391  }
   392  
   393  func (e *epollInterestEntry) afterLoad(context.Context) {}
   394  
   395  // +checklocksignore
   396  func (e *epollInterestEntry) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   397  	stateSourceObject.Load(0, &e.next)
   398  	stateSourceObject.Load(1, &e.prev)
   399  }
   400  
   401  func (l *eventList) StateTypeName() string {
   402  	return "pkg/sentry/vfs.eventList"
   403  }
   404  
   405  func (l *eventList) StateFields() []string {
   406  	return []string{
   407  		"head",
   408  		"tail",
   409  	}
   410  }
   411  
   412  func (l *eventList) beforeSave() {}
   413  
   414  // +checklocksignore
   415  func (l *eventList) StateSave(stateSinkObject state.Sink) {
   416  	l.beforeSave()
   417  	stateSinkObject.Save(0, &l.head)
   418  	stateSinkObject.Save(1, &l.tail)
   419  }
   420  
   421  func (l *eventList) afterLoad(context.Context) {}
   422  
   423  // +checklocksignore
   424  func (l *eventList) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   425  	stateSourceObject.Load(0, &l.head)
   426  	stateSourceObject.Load(1, &l.tail)
   427  }
   428  
   429  func (e *eventEntry) StateTypeName() string {
   430  	return "pkg/sentry/vfs.eventEntry"
   431  }
   432  
   433  func (e *eventEntry) StateFields() []string {
   434  	return []string{
   435  		"next",
   436  		"prev",
   437  	}
   438  }
   439  
   440  func (e *eventEntry) beforeSave() {}
   441  
   442  // +checklocksignore
   443  func (e *eventEntry) StateSave(stateSinkObject state.Sink) {
   444  	e.beforeSave()
   445  	stateSinkObject.Save(0, &e.next)
   446  	stateSinkObject.Save(1, &e.prev)
   447  }
   448  
   449  func (e *eventEntry) afterLoad(context.Context) {}
   450  
   451  // +checklocksignore
   452  func (e *eventEntry) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   453  	stateSourceObject.Load(0, &e.next)
   454  	stateSourceObject.Load(1, &e.prev)
   455  }
   456  
   457  func (fd *FileDescription) StateTypeName() string {
   458  	return "pkg/sentry/vfs.FileDescription"
   459  }
   460  
   461  func (fd *FileDescription) StateFields() []string {
   462  	return []string{
   463  		"FileDescriptionRefs",
   464  		"statusFlags",
   465  		"asyncHandler",
   466  		"epolls",
   467  		"vd",
   468  		"opts",
   469  		"readable",
   470  		"writable",
   471  		"usedLockBSD",
   472  		"impl",
   473  	}
   474  }
   475  
   476  func (fd *FileDescription) beforeSave() {}
   477  
   478  // +checklocksignore
   479  func (fd *FileDescription) StateSave(stateSinkObject state.Sink) {
   480  	fd.beforeSave()
   481  	stateSinkObject.Save(0, &fd.FileDescriptionRefs)
   482  	stateSinkObject.Save(1, &fd.statusFlags)
   483  	stateSinkObject.Save(2, &fd.asyncHandler)
   484  	stateSinkObject.Save(3, &fd.epolls)
   485  	stateSinkObject.Save(4, &fd.vd)
   486  	stateSinkObject.Save(5, &fd.opts)
   487  	stateSinkObject.Save(6, &fd.readable)
   488  	stateSinkObject.Save(7, &fd.writable)
   489  	stateSinkObject.Save(8, &fd.usedLockBSD)
   490  	stateSinkObject.Save(9, &fd.impl)
   491  }
   492  
   493  func (fd *FileDescription) afterLoad(context.Context) {}
   494  
   495  // +checklocksignore
   496  func (fd *FileDescription) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   497  	stateSourceObject.Load(0, &fd.FileDescriptionRefs)
   498  	stateSourceObject.Load(1, &fd.statusFlags)
   499  	stateSourceObject.Load(2, &fd.asyncHandler)
   500  	stateSourceObject.Load(3, &fd.epolls)
   501  	stateSourceObject.Load(4, &fd.vd)
   502  	stateSourceObject.Load(5, &fd.opts)
   503  	stateSourceObject.Load(6, &fd.readable)
   504  	stateSourceObject.Load(7, &fd.writable)
   505  	stateSourceObject.Load(8, &fd.usedLockBSD)
   506  	stateSourceObject.Load(9, &fd.impl)
   507  }
   508  
   509  func (f *FileDescriptionOptions) StateTypeName() string {
   510  	return "pkg/sentry/vfs.FileDescriptionOptions"
   511  }
   512  
   513  func (f *FileDescriptionOptions) StateFields() []string {
   514  	return []string{
   515  		"AllowDirectIO",
   516  		"DenyPRead",
   517  		"DenyPWrite",
   518  		"UseDentryMetadata",
   519  		"DenySpliceIn",
   520  	}
   521  }
   522  
   523  func (f *FileDescriptionOptions) beforeSave() {}
   524  
   525  // +checklocksignore
   526  func (f *FileDescriptionOptions) StateSave(stateSinkObject state.Sink) {
   527  	f.beforeSave()
   528  	stateSinkObject.Save(0, &f.AllowDirectIO)
   529  	stateSinkObject.Save(1, &f.DenyPRead)
   530  	stateSinkObject.Save(2, &f.DenyPWrite)
   531  	stateSinkObject.Save(3, &f.UseDentryMetadata)
   532  	stateSinkObject.Save(4, &f.DenySpliceIn)
   533  }
   534  
   535  func (f *FileDescriptionOptions) afterLoad(context.Context) {}
   536  
   537  // +checklocksignore
   538  func (f *FileDescriptionOptions) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   539  	stateSourceObject.Load(0, &f.AllowDirectIO)
   540  	stateSourceObject.Load(1, &f.DenyPRead)
   541  	stateSourceObject.Load(2, &f.DenyPWrite)
   542  	stateSourceObject.Load(3, &f.UseDentryMetadata)
   543  	stateSourceObject.Load(4, &f.DenySpliceIn)
   544  }
   545  
   546  func (d *Dirent) StateTypeName() string {
   547  	return "pkg/sentry/vfs.Dirent"
   548  }
   549  
   550  func (d *Dirent) StateFields() []string {
   551  	return []string{
   552  		"Name",
   553  		"Type",
   554  		"Ino",
   555  		"NextOff",
   556  	}
   557  }
   558  
   559  func (d *Dirent) beforeSave() {}
   560  
   561  // +checklocksignore
   562  func (d *Dirent) StateSave(stateSinkObject state.Sink) {
   563  	d.beforeSave()
   564  	stateSinkObject.Save(0, &d.Name)
   565  	stateSinkObject.Save(1, &d.Type)
   566  	stateSinkObject.Save(2, &d.Ino)
   567  	stateSinkObject.Save(3, &d.NextOff)
   568  }
   569  
   570  func (d *Dirent) afterLoad(context.Context) {}
   571  
   572  // +checklocksignore
   573  func (d *Dirent) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   574  	stateSourceObject.Load(0, &d.Name)
   575  	stateSourceObject.Load(1, &d.Type)
   576  	stateSourceObject.Load(2, &d.Ino)
   577  	stateSourceObject.Load(3, &d.NextOff)
   578  }
   579  
   580  func (f *FileDescriptionDefaultImpl) StateTypeName() string {
   581  	return "pkg/sentry/vfs.FileDescriptionDefaultImpl"
   582  }
   583  
   584  func (f *FileDescriptionDefaultImpl) StateFields() []string {
   585  	return []string{}
   586  }
   587  
   588  func (f *FileDescriptionDefaultImpl) beforeSave() {}
   589  
   590  // +checklocksignore
   591  func (f *FileDescriptionDefaultImpl) StateSave(stateSinkObject state.Sink) {
   592  	f.beforeSave()
   593  }
   594  
   595  func (f *FileDescriptionDefaultImpl) afterLoad(context.Context) {}
   596  
   597  // +checklocksignore
   598  func (f *FileDescriptionDefaultImpl) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   599  }
   600  
   601  func (d *DirectoryFileDescriptionDefaultImpl) StateTypeName() string {
   602  	return "pkg/sentry/vfs.DirectoryFileDescriptionDefaultImpl"
   603  }
   604  
   605  func (d *DirectoryFileDescriptionDefaultImpl) StateFields() []string {
   606  	return []string{}
   607  }
   608  
   609  func (d *DirectoryFileDescriptionDefaultImpl) beforeSave() {}
   610  
   611  // +checklocksignore
   612  func (d *DirectoryFileDescriptionDefaultImpl) StateSave(stateSinkObject state.Sink) {
   613  	d.beforeSave()
   614  }
   615  
   616  func (d *DirectoryFileDescriptionDefaultImpl) afterLoad(context.Context) {}
   617  
   618  // +checklocksignore
   619  func (d *DirectoryFileDescriptionDefaultImpl) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   620  }
   621  
   622  func (d *DentryMetadataFileDescriptionImpl) StateTypeName() string {
   623  	return "pkg/sentry/vfs.DentryMetadataFileDescriptionImpl"
   624  }
   625  
   626  func (d *DentryMetadataFileDescriptionImpl) StateFields() []string {
   627  	return []string{}
   628  }
   629  
   630  func (d *DentryMetadataFileDescriptionImpl) beforeSave() {}
   631  
   632  // +checklocksignore
   633  func (d *DentryMetadataFileDescriptionImpl) StateSave(stateSinkObject state.Sink) {
   634  	d.beforeSave()
   635  }
   636  
   637  func (d *DentryMetadataFileDescriptionImpl) afterLoad(context.Context) {}
   638  
   639  // +checklocksignore
   640  func (d *DentryMetadataFileDescriptionImpl) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   641  }
   642  
   643  func (s *StaticData) StateTypeName() string {
   644  	return "pkg/sentry/vfs.StaticData"
   645  }
   646  
   647  func (s *StaticData) StateFields() []string {
   648  	return []string{
   649  		"Data",
   650  	}
   651  }
   652  
   653  func (s *StaticData) beforeSave() {}
   654  
   655  // +checklocksignore
   656  func (s *StaticData) StateSave(stateSinkObject state.Sink) {
   657  	s.beforeSave()
   658  	stateSinkObject.Save(0, &s.Data)
   659  }
   660  
   661  func (s *StaticData) afterLoad(context.Context) {}
   662  
   663  // +checklocksignore
   664  func (s *StaticData) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   665  	stateSourceObject.Load(0, &s.Data)
   666  }
   667  
   668  func (fd *DynamicBytesFileDescriptionImpl) StateTypeName() string {
   669  	return "pkg/sentry/vfs.DynamicBytesFileDescriptionImpl"
   670  }
   671  
   672  func (fd *DynamicBytesFileDescriptionImpl) StateFields() []string {
   673  	return []string{
   674  		"vfsfd",
   675  		"data",
   676  		"buf",
   677  		"off",
   678  		"lastRead",
   679  	}
   680  }
   681  
   682  func (fd *DynamicBytesFileDescriptionImpl) beforeSave() {}
   683  
   684  // +checklocksignore
   685  func (fd *DynamicBytesFileDescriptionImpl) StateSave(stateSinkObject state.Sink) {
   686  	fd.beforeSave()
   687  	var bufValue []byte
   688  	bufValue = fd.saveBuf()
   689  	stateSinkObject.SaveValue(2, bufValue)
   690  	stateSinkObject.Save(0, &fd.vfsfd)
   691  	stateSinkObject.Save(1, &fd.data)
   692  	stateSinkObject.Save(3, &fd.off)
   693  	stateSinkObject.Save(4, &fd.lastRead)
   694  }
   695  
   696  func (fd *DynamicBytesFileDescriptionImpl) afterLoad(context.Context) {}
   697  
   698  // +checklocksignore
   699  func (fd *DynamicBytesFileDescriptionImpl) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   700  	stateSourceObject.Load(0, &fd.vfsfd)
   701  	stateSourceObject.Load(1, &fd.data)
   702  	stateSourceObject.Load(3, &fd.off)
   703  	stateSourceObject.Load(4, &fd.lastRead)
   704  	stateSourceObject.LoadValue(2, new([]byte), func(y any) { fd.loadBuf(ctx, y.([]byte)) })
   705  }
   706  
   707  func (fd *LockFD) StateTypeName() string {
   708  	return "pkg/sentry/vfs.LockFD"
   709  }
   710  
   711  func (fd *LockFD) StateFields() []string {
   712  	return []string{
   713  		"locks",
   714  	}
   715  }
   716  
   717  func (fd *LockFD) beforeSave() {}
   718  
   719  // +checklocksignore
   720  func (fd *LockFD) StateSave(stateSinkObject state.Sink) {
   721  	fd.beforeSave()
   722  	stateSinkObject.Save(0, &fd.locks)
   723  }
   724  
   725  func (fd *LockFD) afterLoad(context.Context) {}
   726  
   727  // +checklocksignore
   728  func (fd *LockFD) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   729  	stateSourceObject.Load(0, &fd.locks)
   730  }
   731  
   732  func (n *NoLockFD) StateTypeName() string {
   733  	return "pkg/sentry/vfs.NoLockFD"
   734  }
   735  
   736  func (n *NoLockFD) StateFields() []string {
   737  	return []string{}
   738  }
   739  
   740  func (n *NoLockFD) beforeSave() {}
   741  
   742  // +checklocksignore
   743  func (n *NoLockFD) StateSave(stateSinkObject state.Sink) {
   744  	n.beforeSave()
   745  }
   746  
   747  func (n *NoLockFD) afterLoad(context.Context) {}
   748  
   749  // +checklocksignore
   750  func (n *NoLockFD) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   751  }
   752  
   753  func (b *BadLockFD) StateTypeName() string {
   754  	return "pkg/sentry/vfs.BadLockFD"
   755  }
   756  
   757  func (b *BadLockFD) StateFields() []string {
   758  	return []string{}
   759  }
   760  
   761  func (b *BadLockFD) beforeSave() {}
   762  
   763  // +checklocksignore
   764  func (b *BadLockFD) StateSave(stateSinkObject state.Sink) {
   765  	b.beforeSave()
   766  }
   767  
   768  func (b *BadLockFD) afterLoad(context.Context) {}
   769  
   770  // +checklocksignore
   771  func (b *BadLockFD) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   772  }
   773  
   774  func (r *FileDescriptionRefs) StateTypeName() string {
   775  	return "pkg/sentry/vfs.FileDescriptionRefs"
   776  }
   777  
   778  func (r *FileDescriptionRefs) StateFields() []string {
   779  	return []string{
   780  		"refCount",
   781  	}
   782  }
   783  
   784  func (r *FileDescriptionRefs) beforeSave() {}
   785  
   786  // +checklocksignore
   787  func (r *FileDescriptionRefs) StateSave(stateSinkObject state.Sink) {
   788  	r.beforeSave()
   789  	stateSinkObject.Save(0, &r.refCount)
   790  }
   791  
   792  // +checklocksignore
   793  func (r *FileDescriptionRefs) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   794  	stateSourceObject.Load(0, &r.refCount)
   795  	stateSourceObject.AfterLoad(func() { r.afterLoad(ctx) })
   796  }
   797  
   798  func (fs *Filesystem) StateTypeName() string {
   799  	return "pkg/sentry/vfs.Filesystem"
   800  }
   801  
   802  func (fs *Filesystem) StateFields() []string {
   803  	return []string{
   804  		"FilesystemRefs",
   805  		"vfs",
   806  		"fsType",
   807  		"impl",
   808  	}
   809  }
   810  
   811  func (fs *Filesystem) beforeSave() {}
   812  
   813  // +checklocksignore
   814  func (fs *Filesystem) StateSave(stateSinkObject state.Sink) {
   815  	fs.beforeSave()
   816  	stateSinkObject.Save(0, &fs.FilesystemRefs)
   817  	stateSinkObject.Save(1, &fs.vfs)
   818  	stateSinkObject.Save(2, &fs.fsType)
   819  	stateSinkObject.Save(3, &fs.impl)
   820  }
   821  
   822  func (fs *Filesystem) afterLoad(context.Context) {}
   823  
   824  // +checklocksignore
   825  func (fs *Filesystem) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   826  	stateSourceObject.Load(0, &fs.FilesystemRefs)
   827  	stateSourceObject.Load(1, &fs.vfs)
   828  	stateSourceObject.Load(2, &fs.fsType)
   829  	stateSourceObject.Load(3, &fs.impl)
   830  }
   831  
   832  func (p *PrependPathAtVFSRootError) StateTypeName() string {
   833  	return "pkg/sentry/vfs.PrependPathAtVFSRootError"
   834  }
   835  
   836  func (p *PrependPathAtVFSRootError) StateFields() []string {
   837  	return []string{}
   838  }
   839  
   840  func (p *PrependPathAtVFSRootError) beforeSave() {}
   841  
   842  // +checklocksignore
   843  func (p *PrependPathAtVFSRootError) StateSave(stateSinkObject state.Sink) {
   844  	p.beforeSave()
   845  }
   846  
   847  func (p *PrependPathAtVFSRootError) afterLoad(context.Context) {}
   848  
   849  // +checklocksignore
   850  func (p *PrependPathAtVFSRootError) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   851  }
   852  
   853  func (p *PrependPathAtNonMountRootError) StateTypeName() string {
   854  	return "pkg/sentry/vfs.PrependPathAtNonMountRootError"
   855  }
   856  
   857  func (p *PrependPathAtNonMountRootError) StateFields() []string {
   858  	return []string{}
   859  }
   860  
   861  func (p *PrependPathAtNonMountRootError) beforeSave() {}
   862  
   863  // +checklocksignore
   864  func (p *PrependPathAtNonMountRootError) StateSave(stateSinkObject state.Sink) {
   865  	p.beforeSave()
   866  }
   867  
   868  func (p *PrependPathAtNonMountRootError) afterLoad(context.Context) {}
   869  
   870  // +checklocksignore
   871  func (p *PrependPathAtNonMountRootError) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   872  }
   873  
   874  func (p *PrependPathSyntheticError) StateTypeName() string {
   875  	return "pkg/sentry/vfs.PrependPathSyntheticError"
   876  }
   877  
   878  func (p *PrependPathSyntheticError) StateFields() []string {
   879  	return []string{}
   880  }
   881  
   882  func (p *PrependPathSyntheticError) beforeSave() {}
   883  
   884  // +checklocksignore
   885  func (p *PrependPathSyntheticError) StateSave(stateSinkObject state.Sink) {
   886  	p.beforeSave()
   887  }
   888  
   889  func (p *PrependPathSyntheticError) afterLoad(context.Context) {}
   890  
   891  // +checklocksignore
   892  func (p *PrependPathSyntheticError) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   893  }
   894  
   895  func (r *FilesystemRefs) StateTypeName() string {
   896  	return "pkg/sentry/vfs.FilesystemRefs"
   897  }
   898  
   899  func (r *FilesystemRefs) StateFields() []string {
   900  	return []string{
   901  		"refCount",
   902  	}
   903  }
   904  
   905  func (r *FilesystemRefs) beforeSave() {}
   906  
   907  // +checklocksignore
   908  func (r *FilesystemRefs) StateSave(stateSinkObject state.Sink) {
   909  	r.beforeSave()
   910  	stateSinkObject.Save(0, &r.refCount)
   911  }
   912  
   913  // +checklocksignore
   914  func (r *FilesystemRefs) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   915  	stateSourceObject.Load(0, &r.refCount)
   916  	stateSourceObject.AfterLoad(func() { r.afterLoad(ctx) })
   917  }
   918  
   919  func (r *registeredFilesystemType) StateTypeName() string {
   920  	return "pkg/sentry/vfs.registeredFilesystemType"
   921  }
   922  
   923  func (r *registeredFilesystemType) StateFields() []string {
   924  	return []string{
   925  		"fsType",
   926  		"opts",
   927  	}
   928  }
   929  
   930  func (r *registeredFilesystemType) beforeSave() {}
   931  
   932  // +checklocksignore
   933  func (r *registeredFilesystemType) StateSave(stateSinkObject state.Sink) {
   934  	r.beforeSave()
   935  	stateSinkObject.Save(0, &r.fsType)
   936  	stateSinkObject.Save(1, &r.opts)
   937  }
   938  
   939  func (r *registeredFilesystemType) afterLoad(context.Context) {}
   940  
   941  // +checklocksignore
   942  func (r *registeredFilesystemType) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   943  	stateSourceObject.Load(0, &r.fsType)
   944  	stateSourceObject.Load(1, &r.opts)
   945  }
   946  
   947  func (r *RegisterFilesystemTypeOptions) StateTypeName() string {
   948  	return "pkg/sentry/vfs.RegisterFilesystemTypeOptions"
   949  }
   950  
   951  func (r *RegisterFilesystemTypeOptions) StateFields() []string {
   952  	return []string{
   953  		"AllowUserMount",
   954  		"AllowUserList",
   955  		"RequiresDevice",
   956  	}
   957  }
   958  
   959  func (r *RegisterFilesystemTypeOptions) beforeSave() {}
   960  
   961  // +checklocksignore
   962  func (r *RegisterFilesystemTypeOptions) StateSave(stateSinkObject state.Sink) {
   963  	r.beforeSave()
   964  	stateSinkObject.Save(0, &r.AllowUserMount)
   965  	stateSinkObject.Save(1, &r.AllowUserList)
   966  	stateSinkObject.Save(2, &r.RequiresDevice)
   967  }
   968  
   969  func (r *RegisterFilesystemTypeOptions) afterLoad(context.Context) {}
   970  
   971  // +checklocksignore
   972  func (r *RegisterFilesystemTypeOptions) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   973  	stateSourceObject.Load(0, &r.AllowUserMount)
   974  	stateSourceObject.Load(1, &r.AllowUserList)
   975  	stateSourceObject.Load(2, &r.RequiresDevice)
   976  }
   977  
   978  func (e *EventType) StateTypeName() string {
   979  	return "pkg/sentry/vfs.EventType"
   980  }
   981  
   982  func (e *EventType) StateFields() []string {
   983  	return nil
   984  }
   985  
   986  func (i *Inotify) StateTypeName() string {
   987  	return "pkg/sentry/vfs.Inotify"
   988  }
   989  
   990  func (i *Inotify) StateFields() []string {
   991  	return []string{
   992  		"vfsfd",
   993  		"FileDescriptionDefaultImpl",
   994  		"DentryMetadataFileDescriptionImpl",
   995  		"NoLockFD",
   996  		"id",
   997  		"queue",
   998  		"events",
   999  		"scratch",
  1000  		"nextWatchMinusOne",
  1001  		"watches",
  1002  	}
  1003  }
  1004  
  1005  func (i *Inotify) beforeSave() {}
  1006  
  1007  // +checklocksignore
  1008  func (i *Inotify) StateSave(stateSinkObject state.Sink) {
  1009  	i.beforeSave()
  1010  	stateSinkObject.Save(0, &i.vfsfd)
  1011  	stateSinkObject.Save(1, &i.FileDescriptionDefaultImpl)
  1012  	stateSinkObject.Save(2, &i.DentryMetadataFileDescriptionImpl)
  1013  	stateSinkObject.Save(3, &i.NoLockFD)
  1014  	stateSinkObject.Save(4, &i.id)
  1015  	stateSinkObject.Save(5, &i.queue)
  1016  	stateSinkObject.Save(6, &i.events)
  1017  	stateSinkObject.Save(7, &i.scratch)
  1018  	stateSinkObject.Save(8, &i.nextWatchMinusOne)
  1019  	stateSinkObject.Save(9, &i.watches)
  1020  }
  1021  
  1022  func (i *Inotify) afterLoad(context.Context) {}
  1023  
  1024  // +checklocksignore
  1025  func (i *Inotify) StateLoad(ctx context.Context, stateSourceObject state.Source) {
  1026  	stateSourceObject.Load(0, &i.vfsfd)
  1027  	stateSourceObject.Load(1, &i.FileDescriptionDefaultImpl)
  1028  	stateSourceObject.Load(2, &i.DentryMetadataFileDescriptionImpl)
  1029  	stateSourceObject.Load(3, &i.NoLockFD)
  1030  	stateSourceObject.Load(4, &i.id)
  1031  	stateSourceObject.Load(5, &i.queue)
  1032  	stateSourceObject.Load(6, &i.events)
  1033  	stateSourceObject.Load(7, &i.scratch)
  1034  	stateSourceObject.Load(8, &i.nextWatchMinusOne)
  1035  	stateSourceObject.Load(9, &i.watches)
  1036  }
  1037  
  1038  func (w *Watches) StateTypeName() string {
  1039  	return "pkg/sentry/vfs.Watches"
  1040  }
  1041  
  1042  func (w *Watches) StateFields() []string {
  1043  	return []string{
  1044  		"ws",
  1045  	}
  1046  }
  1047  
  1048  func (w *Watches) beforeSave() {}
  1049  
  1050  // +checklocksignore
  1051  func (w *Watches) StateSave(stateSinkObject state.Sink) {
  1052  	w.beforeSave()
  1053  	stateSinkObject.Save(0, &w.ws)
  1054  }
  1055  
  1056  func (w *Watches) afterLoad(context.Context) {}
  1057  
  1058  // +checklocksignore
  1059  func (w *Watches) StateLoad(ctx context.Context, stateSourceObject state.Source) {
  1060  	stateSourceObject.Load(0, &w.ws)
  1061  }
  1062  
  1063  func (w *Watch) StateTypeName() string {
  1064  	return "pkg/sentry/vfs.Watch"
  1065  }
  1066  
  1067  func (w *Watch) StateFields() []string {
  1068  	return []string{
  1069  		"owner",
  1070  		"wd",
  1071  		"target",
  1072  		"mask",
  1073  		"expired",
  1074  	}
  1075  }
  1076  
  1077  func (w *Watch) beforeSave() {}
  1078  
  1079  // +checklocksignore
  1080  func (w *Watch) StateSave(stateSinkObject state.Sink) {
  1081  	w.beforeSave()
  1082  	stateSinkObject.Save(0, &w.owner)
  1083  	stateSinkObject.Save(1, &w.wd)
  1084  	stateSinkObject.Save(2, &w.target)
  1085  	stateSinkObject.Save(3, &w.mask)
  1086  	stateSinkObject.Save(4, &w.expired)
  1087  }
  1088  
  1089  func (w *Watch) afterLoad(context.Context) {}
  1090  
  1091  // +checklocksignore
  1092  func (w *Watch) StateLoad(ctx context.Context, stateSourceObject state.Source) {
  1093  	stateSourceObject.Load(0, &w.owner)
  1094  	stateSourceObject.Load(1, &w.wd)
  1095  	stateSourceObject.Load(2, &w.target)
  1096  	stateSourceObject.Load(3, &w.mask)
  1097  	stateSourceObject.Load(4, &w.expired)
  1098  }
  1099  
  1100  func (e *Event) StateTypeName() string {
  1101  	return "pkg/sentry/vfs.Event"
  1102  }
  1103  
  1104  func (e *Event) StateFields() []string {
  1105  	return []string{
  1106  		"eventEntry",
  1107  		"wd",
  1108  		"mask",
  1109  		"cookie",
  1110  		"len",
  1111  		"name",
  1112  	}
  1113  }
  1114  
  1115  func (e *Event) beforeSave() {}
  1116  
  1117  // +checklocksignore
  1118  func (e *Event) StateSave(stateSinkObject state.Sink) {
  1119  	e.beforeSave()
  1120  	stateSinkObject.Save(0, &e.eventEntry)
  1121  	stateSinkObject.Save(1, &e.wd)
  1122  	stateSinkObject.Save(2, &e.mask)
  1123  	stateSinkObject.Save(3, &e.cookie)
  1124  	stateSinkObject.Save(4, &e.len)
  1125  	stateSinkObject.Save(5, &e.name)
  1126  }
  1127  
  1128  func (e *Event) afterLoad(context.Context) {}
  1129  
  1130  // +checklocksignore
  1131  func (e *Event) StateLoad(ctx context.Context, stateSourceObject state.Source) {
  1132  	stateSourceObject.Load(0, &e.eventEntry)
  1133  	stateSourceObject.Load(1, &e.wd)
  1134  	stateSourceObject.Load(2, &e.mask)
  1135  	stateSourceObject.Load(3, &e.cookie)
  1136  	stateSourceObject.Load(4, &e.len)
  1137  	stateSourceObject.Load(5, &e.name)
  1138  }
  1139  
  1140  func (fl *FileLocks) StateTypeName() string {
  1141  	return "pkg/sentry/vfs.FileLocks"
  1142  }
  1143  
  1144  func (fl *FileLocks) StateFields() []string {
  1145  	return []string{
  1146  		"bsd",
  1147  		"posix",
  1148  	}
  1149  }
  1150  
  1151  func (fl *FileLocks) beforeSave() {}
  1152  
  1153  // +checklocksignore
  1154  func (fl *FileLocks) StateSave(stateSinkObject state.Sink) {
  1155  	fl.beforeSave()
  1156  	stateSinkObject.Save(0, &fl.bsd)
  1157  	stateSinkObject.Save(1, &fl.posix)
  1158  }
  1159  
  1160  func (fl *FileLocks) afterLoad(context.Context) {}
  1161  
  1162  // +checklocksignore
  1163  func (fl *FileLocks) StateLoad(ctx context.Context, stateSourceObject state.Source) {
  1164  	stateSourceObject.Load(0, &fl.bsd)
  1165  	stateSourceObject.Load(1, &fl.posix)
  1166  }
  1167  
  1168  func (mnt *Mount) StateTypeName() string {
  1169  	return "pkg/sentry/vfs.Mount"
  1170  }
  1171  
  1172  func (mnt *Mount) StateFields() []string {
  1173  	return []string{
  1174  		"vfs",
  1175  		"fs",
  1176  		"root",
  1177  		"ID",
  1178  		"flags",
  1179  		"key",
  1180  		"ns",
  1181  		"refs",
  1182  		"children",
  1183  		"isShared",
  1184  		"sharedEntry",
  1185  		"followerList",
  1186  		"followerEntry",
  1187  		"leader",
  1188  		"groupID",
  1189  		"umounted",
  1190  		"locked",
  1191  		"writers",
  1192  	}
  1193  }
  1194  
  1195  func (mnt *Mount) beforeSave() {}
  1196  
  1197  // +checklocksignore
  1198  func (mnt *Mount) StateSave(stateSinkObject state.Sink) {
  1199  	mnt.beforeSave()
  1200  	var keyValue VirtualDentry
  1201  	keyValue = mnt.saveKey()
  1202  	stateSinkObject.SaveValue(5, keyValue)
  1203  	stateSinkObject.Save(0, &mnt.vfs)
  1204  	stateSinkObject.Save(1, &mnt.fs)
  1205  	stateSinkObject.Save(2, &mnt.root)
  1206  	stateSinkObject.Save(3, &mnt.ID)
  1207  	stateSinkObject.Save(4, &mnt.flags)
  1208  	stateSinkObject.Save(6, &mnt.ns)
  1209  	stateSinkObject.Save(7, &mnt.refs)
  1210  	stateSinkObject.Save(8, &mnt.children)
  1211  	stateSinkObject.Save(9, &mnt.isShared)
  1212  	stateSinkObject.Save(10, &mnt.sharedEntry)
  1213  	stateSinkObject.Save(11, &mnt.followerList)
  1214  	stateSinkObject.Save(12, &mnt.followerEntry)
  1215  	stateSinkObject.Save(13, &mnt.leader)
  1216  	stateSinkObject.Save(14, &mnt.groupID)
  1217  	stateSinkObject.Save(15, &mnt.umounted)
  1218  	stateSinkObject.Save(16, &mnt.locked)
  1219  	stateSinkObject.Save(17, &mnt.writers)
  1220  }
  1221  
  1222  // +checklocksignore
  1223  func (mnt *Mount) StateLoad(ctx context.Context, stateSourceObject state.Source) {
  1224  	stateSourceObject.Load(0, &mnt.vfs)
  1225  	stateSourceObject.Load(1, &mnt.fs)
  1226  	stateSourceObject.Load(2, &mnt.root)
  1227  	stateSourceObject.Load(3, &mnt.ID)
  1228  	stateSourceObject.Load(4, &mnt.flags)
  1229  	stateSourceObject.Load(6, &mnt.ns)
  1230  	stateSourceObject.Load(7, &mnt.refs)
  1231  	stateSourceObject.Load(8, &mnt.children)
  1232  	stateSourceObject.Load(9, &mnt.isShared)
  1233  	stateSourceObject.Load(10, &mnt.sharedEntry)
  1234  	stateSourceObject.Load(11, &mnt.followerList)
  1235  	stateSourceObject.Load(12, &mnt.followerEntry)
  1236  	stateSourceObject.Load(13, &mnt.leader)
  1237  	stateSourceObject.Load(14, &mnt.groupID)
  1238  	stateSourceObject.Load(15, &mnt.umounted)
  1239  	stateSourceObject.Load(16, &mnt.locked)
  1240  	stateSourceObject.Load(17, &mnt.writers)
  1241  	stateSourceObject.LoadValue(5, new(VirtualDentry), func(y any) { mnt.loadKey(ctx, y.(VirtualDentry)) })
  1242  	stateSourceObject.AfterLoad(func() { mnt.afterLoad(ctx) })
  1243  }
  1244  
  1245  func (u *umountRecursiveOptions) StateTypeName() string {
  1246  	return "pkg/sentry/vfs.umountRecursiveOptions"
  1247  }
  1248  
  1249  func (u *umountRecursiveOptions) StateFields() []string {
  1250  	return []string{
  1251  		"eager",
  1252  		"disconnectHierarchy",
  1253  		"propagate",
  1254  	}
  1255  }
  1256  
  1257  func (u *umountRecursiveOptions) beforeSave() {}
  1258  
  1259  // +checklocksignore
  1260  func (u *umountRecursiveOptions) StateSave(stateSinkObject state.Sink) {
  1261  	u.beforeSave()
  1262  	stateSinkObject.Save(0, &u.eager)
  1263  	stateSinkObject.Save(1, &u.disconnectHierarchy)
  1264  	stateSinkObject.Save(2, &u.propagate)
  1265  }
  1266  
  1267  func (u *umountRecursiveOptions) afterLoad(context.Context) {}
  1268  
  1269  // +checklocksignore
  1270  func (u *umountRecursiveOptions) StateLoad(ctx context.Context, stateSourceObject state.Source) {
  1271  	stateSourceObject.Load(0, &u.eager)
  1272  	stateSourceObject.Load(1, &u.disconnectHierarchy)
  1273  	stateSourceObject.Load(2, &u.propagate)
  1274  }
  1275  
  1276  func (l *followerList) StateTypeName() string {
  1277  	return "pkg/sentry/vfs.followerList"
  1278  }
  1279  
  1280  func (l *followerList) StateFields() []string {
  1281  	return []string{
  1282  		"head",
  1283  		"tail",
  1284  	}
  1285  }
  1286  
  1287  func (l *followerList) beforeSave() {}
  1288  
  1289  // +checklocksignore
  1290  func (l *followerList) StateSave(stateSinkObject state.Sink) {
  1291  	l.beforeSave()
  1292  	stateSinkObject.Save(0, &l.head)
  1293  	stateSinkObject.Save(1, &l.tail)
  1294  }
  1295  
  1296  func (l *followerList) afterLoad(context.Context) {}
  1297  
  1298  // +checklocksignore
  1299  func (l *followerList) StateLoad(ctx context.Context, stateSourceObject state.Source) {
  1300  	stateSourceObject.Load(0, &l.head)
  1301  	stateSourceObject.Load(1, &l.tail)
  1302  }
  1303  
  1304  func (e *followerEntry) StateTypeName() string {
  1305  	return "pkg/sentry/vfs.followerEntry"
  1306  }
  1307  
  1308  func (e *followerEntry) StateFields() []string {
  1309  	return []string{
  1310  		"next",
  1311  		"prev",
  1312  	}
  1313  }
  1314  
  1315  func (e *followerEntry) beforeSave() {}
  1316  
  1317  // +checklocksignore
  1318  func (e *followerEntry) StateSave(stateSinkObject state.Sink) {
  1319  	e.beforeSave()
  1320  	stateSinkObject.Save(0, &e.next)
  1321  	stateSinkObject.Save(1, &e.prev)
  1322  }
  1323  
  1324  func (e *followerEntry) afterLoad(context.Context) {}
  1325  
  1326  // +checklocksignore
  1327  func (e *followerEntry) StateLoad(ctx context.Context, stateSourceObject state.Source) {
  1328  	stateSourceObject.Load(0, &e.next)
  1329  	stateSourceObject.Load(1, &e.prev)
  1330  }
  1331  
  1332  func (r *namespaceRefs) StateTypeName() string {
  1333  	return "pkg/sentry/vfs.namespaceRefs"
  1334  }
  1335  
  1336  func (r *namespaceRefs) StateFields() []string {
  1337  	return []string{
  1338  		"refCount",
  1339  	}
  1340  }
  1341  
  1342  func (r *namespaceRefs) beforeSave() {}
  1343  
  1344  // +checklocksignore
  1345  func (r *namespaceRefs) StateSave(stateSinkObject state.Sink) {
  1346  	r.beforeSave()
  1347  	stateSinkObject.Save(0, &r.refCount)
  1348  }
  1349  
  1350  // +checklocksignore
  1351  func (r *namespaceRefs) StateLoad(ctx context.Context, stateSourceObject state.Source) {
  1352  	stateSourceObject.Load(0, &r.refCount)
  1353  	stateSourceObject.AfterLoad(func() { r.afterLoad(ctx) })
  1354  }
  1355  
  1356  func (e *mountEntry) StateTypeName() string {
  1357  	return "pkg/sentry/vfs.mountEntry"
  1358  }
  1359  
  1360  func (e *mountEntry) StateFields() []string {
  1361  	return []string{
  1362  		"next",
  1363  		"prev",
  1364  		"container",
  1365  	}
  1366  }
  1367  
  1368  func (e *mountEntry) beforeSave() {}
  1369  
  1370  // +checklocksignore
  1371  func (e *mountEntry) StateSave(stateSinkObject state.Sink) {
  1372  	e.beforeSave()
  1373  	stateSinkObject.Save(0, &e.next)
  1374  	stateSinkObject.Save(1, &e.prev)
  1375  	stateSinkObject.Save(2, &e.container)
  1376  }
  1377  
  1378  func (e *mountEntry) afterLoad(context.Context) {}
  1379  
  1380  // +checklocksignore
  1381  func (e *mountEntry) StateLoad(ctx context.Context, stateSourceObject state.Source) {
  1382  	stateSourceObject.Load(0, &e.next)
  1383  	stateSourceObject.Load(1, &e.prev)
  1384  	stateSourceObject.Load(2, &e.container)
  1385  }
  1386  
  1387  func (mntns *MountNamespace) StateTypeName() string {
  1388  	return "pkg/sentry/vfs.MountNamespace"
  1389  }
  1390  
  1391  func (mntns *MountNamespace) StateFields() []string {
  1392  	return []string{
  1393  		"Refs",
  1394  		"Owner",
  1395  		"root",
  1396  		"mountpoints",
  1397  		"mounts",
  1398  		"pending",
  1399  	}
  1400  }
  1401  
  1402  func (mntns *MountNamespace) beforeSave() {}
  1403  
  1404  // +checklocksignore
  1405  func (mntns *MountNamespace) StateSave(stateSinkObject state.Sink) {
  1406  	mntns.beforeSave()
  1407  	stateSinkObject.Save(0, &mntns.Refs)
  1408  	stateSinkObject.Save(1, &mntns.Owner)
  1409  	stateSinkObject.Save(2, &mntns.root)
  1410  	stateSinkObject.Save(3, &mntns.mountpoints)
  1411  	stateSinkObject.Save(4, &mntns.mounts)
  1412  	stateSinkObject.Save(5, &mntns.pending)
  1413  }
  1414  
  1415  func (mntns *MountNamespace) afterLoad(context.Context) {}
  1416  
  1417  // +checklocksignore
  1418  func (mntns *MountNamespace) StateLoad(ctx context.Context, stateSourceObject state.Source) {
  1419  	stateSourceObject.Load(0, &mntns.Refs)
  1420  	stateSourceObject.Load(1, &mntns.Owner)
  1421  	stateSourceObject.Load(2, &mntns.root)
  1422  	stateSourceObject.Load(3, &mntns.mountpoints)
  1423  	stateSourceObject.Load(4, &mntns.mounts)
  1424  	stateSourceObject.Load(5, &mntns.pending)
  1425  }
  1426  
  1427  func (fd *opathFD) StateTypeName() string {
  1428  	return "pkg/sentry/vfs.opathFD"
  1429  }
  1430  
  1431  func (fd *opathFD) StateFields() []string {
  1432  	return []string{
  1433  		"vfsfd",
  1434  		"FileDescriptionDefaultImpl",
  1435  		"BadLockFD",
  1436  	}
  1437  }
  1438  
  1439  func (fd *opathFD) beforeSave() {}
  1440  
  1441  // +checklocksignore
  1442  func (fd *opathFD) StateSave(stateSinkObject state.Sink) {
  1443  	fd.beforeSave()
  1444  	stateSinkObject.Save(0, &fd.vfsfd)
  1445  	stateSinkObject.Save(1, &fd.FileDescriptionDefaultImpl)
  1446  	stateSinkObject.Save(2, &fd.BadLockFD)
  1447  }
  1448  
  1449  func (fd *opathFD) afterLoad(context.Context) {}
  1450  
  1451  // +checklocksignore
  1452  func (fd *opathFD) StateLoad(ctx context.Context, stateSourceObject state.Source) {
  1453  	stateSourceObject.Load(0, &fd.vfsfd)
  1454  	stateSourceObject.Load(1, &fd.FileDescriptionDefaultImpl)
  1455  	stateSourceObject.Load(2, &fd.BadLockFD)
  1456  }
  1457  
  1458  func (g *GetDentryOptions) StateTypeName() string {
  1459  	return "pkg/sentry/vfs.GetDentryOptions"
  1460  }
  1461  
  1462  func (g *GetDentryOptions) StateFields() []string {
  1463  	return []string{
  1464  		"CheckSearchable",
  1465  	}
  1466  }
  1467  
  1468  func (g *GetDentryOptions) beforeSave() {}
  1469  
  1470  // +checklocksignore
  1471  func (g *GetDentryOptions) StateSave(stateSinkObject state.Sink) {
  1472  	g.beforeSave()
  1473  	stateSinkObject.Save(0, &g.CheckSearchable)
  1474  }
  1475  
  1476  func (g *GetDentryOptions) afterLoad(context.Context) {}
  1477  
  1478  // +checklocksignore
  1479  func (g *GetDentryOptions) StateLoad(ctx context.Context, stateSourceObject state.Source) {
  1480  	stateSourceObject.Load(0, &g.CheckSearchable)
  1481  }
  1482  
  1483  func (m *MkdirOptions) StateTypeName() string {
  1484  	return "pkg/sentry/vfs.MkdirOptions"
  1485  }
  1486  
  1487  func (m *MkdirOptions) StateFields() []string {
  1488  	return []string{
  1489  		"Mode",
  1490  		"ForSyntheticMountpoint",
  1491  	}
  1492  }
  1493  
  1494  func (m *MkdirOptions) beforeSave() {}
  1495  
  1496  // +checklocksignore
  1497  func (m *MkdirOptions) StateSave(stateSinkObject state.Sink) {
  1498  	m.beforeSave()
  1499  	stateSinkObject.Save(0, &m.Mode)
  1500  	stateSinkObject.Save(1, &m.ForSyntheticMountpoint)
  1501  }
  1502  
  1503  func (m *MkdirOptions) afterLoad(context.Context) {}
  1504  
  1505  // +checklocksignore
  1506  func (m *MkdirOptions) StateLoad(ctx context.Context, stateSourceObject state.Source) {
  1507  	stateSourceObject.Load(0, &m.Mode)
  1508  	stateSourceObject.Load(1, &m.ForSyntheticMountpoint)
  1509  }
  1510  
  1511  func (m *MknodOptions) StateTypeName() string {
  1512  	return "pkg/sentry/vfs.MknodOptions"
  1513  }
  1514  
  1515  func (m *MknodOptions) StateFields() []string {
  1516  	return []string{
  1517  		"Mode",
  1518  		"DevMajor",
  1519  		"DevMinor",
  1520  		"Endpoint",
  1521  	}
  1522  }
  1523  
  1524  func (m *MknodOptions) beforeSave() {}
  1525  
  1526  // +checklocksignore
  1527  func (m *MknodOptions) StateSave(stateSinkObject state.Sink) {
  1528  	m.beforeSave()
  1529  	stateSinkObject.Save(0, &m.Mode)
  1530  	stateSinkObject.Save(1, &m.DevMajor)
  1531  	stateSinkObject.Save(2, &m.DevMinor)
  1532  	stateSinkObject.Save(3, &m.Endpoint)
  1533  }
  1534  
  1535  func (m *MknodOptions) afterLoad(context.Context) {}
  1536  
  1537  // +checklocksignore
  1538  func (m *MknodOptions) StateLoad(ctx context.Context, stateSourceObject state.Source) {
  1539  	stateSourceObject.Load(0, &m.Mode)
  1540  	stateSourceObject.Load(1, &m.DevMajor)
  1541  	stateSourceObject.Load(2, &m.DevMinor)
  1542  	stateSourceObject.Load(3, &m.Endpoint)
  1543  }
  1544  
  1545  func (m *MountFlags) StateTypeName() string {
  1546  	return "pkg/sentry/vfs.MountFlags"
  1547  }
  1548  
  1549  func (m *MountFlags) StateFields() []string {
  1550  	return []string{
  1551  		"NoExec",
  1552  		"NoATime",
  1553  		"NoDev",
  1554  		"NoSUID",
  1555  	}
  1556  }
  1557  
  1558  func (m *MountFlags) beforeSave() {}
  1559  
  1560  // +checklocksignore
  1561  func (m *MountFlags) StateSave(stateSinkObject state.Sink) {
  1562  	m.beforeSave()
  1563  	stateSinkObject.Save(0, &m.NoExec)
  1564  	stateSinkObject.Save(1, &m.NoATime)
  1565  	stateSinkObject.Save(2, &m.NoDev)
  1566  	stateSinkObject.Save(3, &m.NoSUID)
  1567  }
  1568  
  1569  func (m *MountFlags) afterLoad(context.Context) {}
  1570  
  1571  // +checklocksignore
  1572  func (m *MountFlags) StateLoad(ctx context.Context, stateSourceObject state.Source) {
  1573  	stateSourceObject.Load(0, &m.NoExec)
  1574  	stateSourceObject.Load(1, &m.NoATime)
  1575  	stateSourceObject.Load(2, &m.NoDev)
  1576  	stateSourceObject.Load(3, &m.NoSUID)
  1577  }
  1578  
  1579  func (m *MountOptions) StateTypeName() string {
  1580  	return "pkg/sentry/vfs.MountOptions"
  1581  }
  1582  
  1583  func (m *MountOptions) StateFields() []string {
  1584  	return []string{
  1585  		"Flags",
  1586  		"ReadOnly",
  1587  		"GetFilesystemOptions",
  1588  		"Locked",
  1589  	}
  1590  }
  1591  
  1592  func (m *MountOptions) beforeSave() {}
  1593  
  1594  // +checklocksignore
  1595  func (m *MountOptions) StateSave(stateSinkObject state.Sink) {
  1596  	m.beforeSave()
  1597  	stateSinkObject.Save(0, &m.Flags)
  1598  	stateSinkObject.Save(1, &m.ReadOnly)
  1599  	stateSinkObject.Save(2, &m.GetFilesystemOptions)
  1600  	stateSinkObject.Save(3, &m.Locked)
  1601  }
  1602  
  1603  func (m *MountOptions) afterLoad(context.Context) {}
  1604  
  1605  // +checklocksignore
  1606  func (m *MountOptions) StateLoad(ctx context.Context, stateSourceObject state.Source) {
  1607  	stateSourceObject.Load(0, &m.Flags)
  1608  	stateSourceObject.Load(1, &m.ReadOnly)
  1609  	stateSourceObject.Load(2, &m.GetFilesystemOptions)
  1610  	stateSourceObject.Load(3, &m.Locked)
  1611  }
  1612  
  1613  func (o *OpenOptions) StateTypeName() string {
  1614  	return "pkg/sentry/vfs.OpenOptions"
  1615  }
  1616  
  1617  func (o *OpenOptions) StateFields() []string {
  1618  	return []string{
  1619  		"Flags",
  1620  		"Mode",
  1621  		"FileExec",
  1622  	}
  1623  }
  1624  
  1625  func (o *OpenOptions) beforeSave() {}
  1626  
  1627  // +checklocksignore
  1628  func (o *OpenOptions) StateSave(stateSinkObject state.Sink) {
  1629  	o.beforeSave()
  1630  	stateSinkObject.Save(0, &o.Flags)
  1631  	stateSinkObject.Save(1, &o.Mode)
  1632  	stateSinkObject.Save(2, &o.FileExec)
  1633  }
  1634  
  1635  func (o *OpenOptions) afterLoad(context.Context) {}
  1636  
  1637  // +checklocksignore
  1638  func (o *OpenOptions) StateLoad(ctx context.Context, stateSourceObject state.Source) {
  1639  	stateSourceObject.Load(0, &o.Flags)
  1640  	stateSourceObject.Load(1, &o.Mode)
  1641  	stateSourceObject.Load(2, &o.FileExec)
  1642  }
  1643  
  1644  func (r *ReadOptions) StateTypeName() string {
  1645  	return "pkg/sentry/vfs.ReadOptions"
  1646  }
  1647  
  1648  func (r *ReadOptions) StateFields() []string {
  1649  	return []string{
  1650  		"Flags",
  1651  	}
  1652  }
  1653  
  1654  func (r *ReadOptions) beforeSave() {}
  1655  
  1656  // +checklocksignore
  1657  func (r *ReadOptions) StateSave(stateSinkObject state.Sink) {
  1658  	r.beforeSave()
  1659  	stateSinkObject.Save(0, &r.Flags)
  1660  }
  1661  
  1662  func (r *ReadOptions) afterLoad(context.Context) {}
  1663  
  1664  // +checklocksignore
  1665  func (r *ReadOptions) StateLoad(ctx context.Context, stateSourceObject state.Source) {
  1666  	stateSourceObject.Load(0, &r.Flags)
  1667  }
  1668  
  1669  func (r *RenameOptions) StateTypeName() string {
  1670  	return "pkg/sentry/vfs.RenameOptions"
  1671  }
  1672  
  1673  func (r *RenameOptions) StateFields() []string {
  1674  	return []string{
  1675  		"Flags",
  1676  		"MustBeDir",
  1677  	}
  1678  }
  1679  
  1680  func (r *RenameOptions) beforeSave() {}
  1681  
  1682  // +checklocksignore
  1683  func (r *RenameOptions) StateSave(stateSinkObject state.Sink) {
  1684  	r.beforeSave()
  1685  	stateSinkObject.Save(0, &r.Flags)
  1686  	stateSinkObject.Save(1, &r.MustBeDir)
  1687  }
  1688  
  1689  func (r *RenameOptions) afterLoad(context.Context) {}
  1690  
  1691  // +checklocksignore
  1692  func (r *RenameOptions) StateLoad(ctx context.Context, stateSourceObject state.Source) {
  1693  	stateSourceObject.Load(0, &r.Flags)
  1694  	stateSourceObject.Load(1, &r.MustBeDir)
  1695  }
  1696  
  1697  func (s *SetStatOptions) StateTypeName() string {
  1698  	return "pkg/sentry/vfs.SetStatOptions"
  1699  }
  1700  
  1701  func (s *SetStatOptions) StateFields() []string {
  1702  	return []string{
  1703  		"Stat",
  1704  		"NeedWritePerm",
  1705  	}
  1706  }
  1707  
  1708  func (s *SetStatOptions) beforeSave() {}
  1709  
  1710  // +checklocksignore
  1711  func (s *SetStatOptions) StateSave(stateSinkObject state.Sink) {
  1712  	s.beforeSave()
  1713  	stateSinkObject.Save(0, &s.Stat)
  1714  	stateSinkObject.Save(1, &s.NeedWritePerm)
  1715  }
  1716  
  1717  func (s *SetStatOptions) afterLoad(context.Context) {}
  1718  
  1719  // +checklocksignore
  1720  func (s *SetStatOptions) StateLoad(ctx context.Context, stateSourceObject state.Source) {
  1721  	stateSourceObject.Load(0, &s.Stat)
  1722  	stateSourceObject.Load(1, &s.NeedWritePerm)
  1723  }
  1724  
  1725  func (b *BoundEndpointOptions) StateTypeName() string {
  1726  	return "pkg/sentry/vfs.BoundEndpointOptions"
  1727  }
  1728  
  1729  func (b *BoundEndpointOptions) StateFields() []string {
  1730  	return []string{
  1731  		"Addr",
  1732  	}
  1733  }
  1734  
  1735  func (b *BoundEndpointOptions) beforeSave() {}
  1736  
  1737  // +checklocksignore
  1738  func (b *BoundEndpointOptions) StateSave(stateSinkObject state.Sink) {
  1739  	b.beforeSave()
  1740  	stateSinkObject.Save(0, &b.Addr)
  1741  }
  1742  
  1743  func (b *BoundEndpointOptions) afterLoad(context.Context) {}
  1744  
  1745  // +checklocksignore
  1746  func (b *BoundEndpointOptions) StateLoad(ctx context.Context, stateSourceObject state.Source) {
  1747  	stateSourceObject.Load(0, &b.Addr)
  1748  }
  1749  
  1750  func (g *GetXattrOptions) StateTypeName() string {
  1751  	return "pkg/sentry/vfs.GetXattrOptions"
  1752  }
  1753  
  1754  func (g *GetXattrOptions) StateFields() []string {
  1755  	return []string{
  1756  		"Name",
  1757  		"Size",
  1758  	}
  1759  }
  1760  
  1761  func (g *GetXattrOptions) beforeSave() {}
  1762  
  1763  // +checklocksignore
  1764  func (g *GetXattrOptions) StateSave(stateSinkObject state.Sink) {
  1765  	g.beforeSave()
  1766  	stateSinkObject.Save(0, &g.Name)
  1767  	stateSinkObject.Save(1, &g.Size)
  1768  }
  1769  
  1770  func (g *GetXattrOptions) afterLoad(context.Context) {}
  1771  
  1772  // +checklocksignore
  1773  func (g *GetXattrOptions) StateLoad(ctx context.Context, stateSourceObject state.Source) {
  1774  	stateSourceObject.Load(0, &g.Name)
  1775  	stateSourceObject.Load(1, &g.Size)
  1776  }
  1777  
  1778  func (s *SetXattrOptions) StateTypeName() string {
  1779  	return "pkg/sentry/vfs.SetXattrOptions"
  1780  }
  1781  
  1782  func (s *SetXattrOptions) StateFields() []string {
  1783  	return []string{
  1784  		"Name",
  1785  		"Value",
  1786  		"Flags",
  1787  	}
  1788  }
  1789  
  1790  func (s *SetXattrOptions) beforeSave() {}
  1791  
  1792  // +checklocksignore
  1793  func (s *SetXattrOptions) StateSave(stateSinkObject state.Sink) {
  1794  	s.beforeSave()
  1795  	stateSinkObject.Save(0, &s.Name)
  1796  	stateSinkObject.Save(1, &s.Value)
  1797  	stateSinkObject.Save(2, &s.Flags)
  1798  }
  1799  
  1800  func (s *SetXattrOptions) afterLoad(context.Context) {}
  1801  
  1802  // +checklocksignore
  1803  func (s *SetXattrOptions) StateLoad(ctx context.Context, stateSourceObject state.Source) {
  1804  	stateSourceObject.Load(0, &s.Name)
  1805  	stateSourceObject.Load(1, &s.Value)
  1806  	stateSourceObject.Load(2, &s.Flags)
  1807  }
  1808  
  1809  func (s *StatOptions) StateTypeName() string {
  1810  	return "pkg/sentry/vfs.StatOptions"
  1811  }
  1812  
  1813  func (s *StatOptions) StateFields() []string {
  1814  	return []string{
  1815  		"Mask",
  1816  		"Sync",
  1817  	}
  1818  }
  1819  
  1820  func (s *StatOptions) beforeSave() {}
  1821  
  1822  // +checklocksignore
  1823  func (s *StatOptions) StateSave(stateSinkObject state.Sink) {
  1824  	s.beforeSave()
  1825  	stateSinkObject.Save(0, &s.Mask)
  1826  	stateSinkObject.Save(1, &s.Sync)
  1827  }
  1828  
  1829  func (s *StatOptions) afterLoad(context.Context) {}
  1830  
  1831  // +checklocksignore
  1832  func (s *StatOptions) StateLoad(ctx context.Context, stateSourceObject state.Source) {
  1833  	stateSourceObject.Load(0, &s.Mask)
  1834  	stateSourceObject.Load(1, &s.Sync)
  1835  }
  1836  
  1837  func (u *UmountOptions) StateTypeName() string {
  1838  	return "pkg/sentry/vfs.UmountOptions"
  1839  }
  1840  
  1841  func (u *UmountOptions) StateFields() []string {
  1842  	return []string{
  1843  		"Flags",
  1844  	}
  1845  }
  1846  
  1847  func (u *UmountOptions) beforeSave() {}
  1848  
  1849  // +checklocksignore
  1850  func (u *UmountOptions) StateSave(stateSinkObject state.Sink) {
  1851  	u.beforeSave()
  1852  	stateSinkObject.Save(0, &u.Flags)
  1853  }
  1854  
  1855  func (u *UmountOptions) afterLoad(context.Context) {}
  1856  
  1857  // +checklocksignore
  1858  func (u *UmountOptions) StateLoad(ctx context.Context, stateSourceObject state.Source) {
  1859  	stateSourceObject.Load(0, &u.Flags)
  1860  }
  1861  
  1862  func (w *WriteOptions) StateTypeName() string {
  1863  	return "pkg/sentry/vfs.WriteOptions"
  1864  }
  1865  
  1866  func (w *WriteOptions) StateFields() []string {
  1867  	return []string{
  1868  		"Flags",
  1869  	}
  1870  }
  1871  
  1872  func (w *WriteOptions) beforeSave() {}
  1873  
  1874  // +checklocksignore
  1875  func (w *WriteOptions) StateSave(stateSinkObject state.Sink) {
  1876  	w.beforeSave()
  1877  	stateSinkObject.Save(0, &w.Flags)
  1878  }
  1879  
  1880  func (w *WriteOptions) afterLoad(context.Context) {}
  1881  
  1882  // +checklocksignore
  1883  func (w *WriteOptions) StateLoad(ctx context.Context, stateSourceObject state.Source) {
  1884  	stateSourceObject.Load(0, &w.Flags)
  1885  }
  1886  
  1887  func (a *AccessTypes) StateTypeName() string {
  1888  	return "pkg/sentry/vfs.AccessTypes"
  1889  }
  1890  
  1891  func (a *AccessTypes) StateFields() []string {
  1892  	return nil
  1893  }
  1894  
  1895  func (rp *ResolvingPath) StateTypeName() string {
  1896  	return "pkg/sentry/vfs.ResolvingPath"
  1897  }
  1898  
  1899  func (rp *ResolvingPath) StateFields() []string {
  1900  	return []string{
  1901  		"vfs",
  1902  		"root",
  1903  		"mount",
  1904  		"start",
  1905  		"pit",
  1906  		"flags",
  1907  		"mustBeDir",
  1908  		"symlinks",
  1909  		"curPart",
  1910  		"creds",
  1911  		"nextMount",
  1912  		"nextStart",
  1913  		"absSymlinkTarget",
  1914  		"parts",
  1915  	}
  1916  }
  1917  
  1918  func (rp *ResolvingPath) beforeSave() {}
  1919  
  1920  // +checklocksignore
  1921  func (rp *ResolvingPath) StateSave(stateSinkObject state.Sink) {
  1922  	rp.beforeSave()
  1923  	stateSinkObject.Save(0, &rp.vfs)
  1924  	stateSinkObject.Save(1, &rp.root)
  1925  	stateSinkObject.Save(2, &rp.mount)
  1926  	stateSinkObject.Save(3, &rp.start)
  1927  	stateSinkObject.Save(4, &rp.pit)
  1928  	stateSinkObject.Save(5, &rp.flags)
  1929  	stateSinkObject.Save(6, &rp.mustBeDir)
  1930  	stateSinkObject.Save(7, &rp.symlinks)
  1931  	stateSinkObject.Save(8, &rp.curPart)
  1932  	stateSinkObject.Save(9, &rp.creds)
  1933  	stateSinkObject.Save(10, &rp.nextMount)
  1934  	stateSinkObject.Save(11, &rp.nextStart)
  1935  	stateSinkObject.Save(12, &rp.absSymlinkTarget)
  1936  	stateSinkObject.Save(13, &rp.parts)
  1937  }
  1938  
  1939  func (rp *ResolvingPath) afterLoad(context.Context) {}
  1940  
  1941  // +checklocksignore
  1942  func (rp *ResolvingPath) StateLoad(ctx context.Context, stateSourceObject state.Source) {
  1943  	stateSourceObject.Load(0, &rp.vfs)
  1944  	stateSourceObject.Load(1, &rp.root)
  1945  	stateSourceObject.Load(2, &rp.mount)
  1946  	stateSourceObject.Load(3, &rp.start)
  1947  	stateSourceObject.Load(4, &rp.pit)
  1948  	stateSourceObject.Load(5, &rp.flags)
  1949  	stateSourceObject.Load(6, &rp.mustBeDir)
  1950  	stateSourceObject.Load(7, &rp.symlinks)
  1951  	stateSourceObject.Load(8, &rp.curPart)
  1952  	stateSourceObject.Load(9, &rp.creds)
  1953  	stateSourceObject.Load(10, &rp.nextMount)
  1954  	stateSourceObject.Load(11, &rp.nextStart)
  1955  	stateSourceObject.Load(12, &rp.absSymlinkTarget)
  1956  	stateSourceObject.Load(13, &rp.parts)
  1957  }
  1958  
  1959  func (r *resolveMountRootOrJumpError) StateTypeName() string {
  1960  	return "pkg/sentry/vfs.resolveMountRootOrJumpError"
  1961  }
  1962  
  1963  func (r *resolveMountRootOrJumpError) StateFields() []string {
  1964  	return []string{}
  1965  }
  1966  
  1967  func (r *resolveMountRootOrJumpError) beforeSave() {}
  1968  
  1969  // +checklocksignore
  1970  func (r *resolveMountRootOrJumpError) StateSave(stateSinkObject state.Sink) {
  1971  	r.beforeSave()
  1972  }
  1973  
  1974  func (r *resolveMountRootOrJumpError) afterLoad(context.Context) {}
  1975  
  1976  // +checklocksignore
  1977  func (r *resolveMountRootOrJumpError) StateLoad(ctx context.Context, stateSourceObject state.Source) {
  1978  }
  1979  
  1980  func (r *resolveMountPointError) StateTypeName() string {
  1981  	return "pkg/sentry/vfs.resolveMountPointError"
  1982  }
  1983  
  1984  func (r *resolveMountPointError) StateFields() []string {
  1985  	return []string{}
  1986  }
  1987  
  1988  func (r *resolveMountPointError) beforeSave() {}
  1989  
  1990  // +checklocksignore
  1991  func (r *resolveMountPointError) StateSave(stateSinkObject state.Sink) {
  1992  	r.beforeSave()
  1993  }
  1994  
  1995  func (r *resolveMountPointError) afterLoad(context.Context) {}
  1996  
  1997  // +checklocksignore
  1998  func (r *resolveMountPointError) StateLoad(ctx context.Context, stateSourceObject state.Source) {
  1999  }
  2000  
  2001  func (r *resolveAbsSymlinkError) StateTypeName() string {
  2002  	return "pkg/sentry/vfs.resolveAbsSymlinkError"
  2003  }
  2004  
  2005  func (r *resolveAbsSymlinkError) StateFields() []string {
  2006  	return []string{}
  2007  }
  2008  
  2009  func (r *resolveAbsSymlinkError) beforeSave() {}
  2010  
  2011  // +checklocksignore
  2012  func (r *resolveAbsSymlinkError) StateSave(stateSinkObject state.Sink) {
  2013  	r.beforeSave()
  2014  }
  2015  
  2016  func (r *resolveAbsSymlinkError) afterLoad(context.Context) {}
  2017  
  2018  // +checklocksignore
  2019  func (r *resolveAbsSymlinkError) StateLoad(ctx context.Context, stateSourceObject state.Source) {
  2020  }
  2021  
  2022  func (f *RestoreID) StateTypeName() string {
  2023  	return "pkg/sentry/vfs.RestoreID"
  2024  }
  2025  
  2026  func (f *RestoreID) StateFields() []string {
  2027  	return []string{
  2028  		"ContainerName",
  2029  		"Path",
  2030  	}
  2031  }
  2032  
  2033  func (f *RestoreID) beforeSave() {}
  2034  
  2035  // +checklocksignore
  2036  func (f *RestoreID) StateSave(stateSinkObject state.Sink) {
  2037  	f.beforeSave()
  2038  	stateSinkObject.Save(0, &f.ContainerName)
  2039  	stateSinkObject.Save(1, &f.Path)
  2040  }
  2041  
  2042  func (f *RestoreID) afterLoad(context.Context) {}
  2043  
  2044  // +checklocksignore
  2045  func (f *RestoreID) StateLoad(ctx context.Context, stateSourceObject state.Source) {
  2046  	stateSourceObject.Load(0, &f.ContainerName)
  2047  	stateSourceObject.Load(1, &f.Path)
  2048  }
  2049  
  2050  func (vfs *VirtualFilesystem) StateTypeName() string {
  2051  	return "pkg/sentry/vfs.VirtualFilesystem"
  2052  }
  2053  
  2054  func (vfs *VirtualFilesystem) StateFields() []string {
  2055  	return []string{
  2056  		"mounts",
  2057  		"mountpoints",
  2058  		"lastMountID",
  2059  		"anonMount",
  2060  		"devices",
  2061  		"dynCharDevMajorUsed",
  2062  		"anonBlockDevMinorNext",
  2063  		"anonBlockDevMinor",
  2064  		"fsTypes",
  2065  		"filesystems",
  2066  		"groupIDBitmap",
  2067  		"mountPromises",
  2068  		"toDecRef",
  2069  	}
  2070  }
  2071  
  2072  func (vfs *VirtualFilesystem) beforeSave() {}
  2073  
  2074  // +checklocksignore
  2075  func (vfs *VirtualFilesystem) StateSave(stateSinkObject state.Sink) {
  2076  	vfs.beforeSave()
  2077  	var mountsValue []*Mount
  2078  	mountsValue = vfs.saveMounts()
  2079  	stateSinkObject.SaveValue(0, mountsValue)
  2080  	stateSinkObject.Save(1, &vfs.mountpoints)
  2081  	stateSinkObject.Save(2, &vfs.lastMountID)
  2082  	stateSinkObject.Save(3, &vfs.anonMount)
  2083  	stateSinkObject.Save(4, &vfs.devices)
  2084  	stateSinkObject.Save(5, &vfs.dynCharDevMajorUsed)
  2085  	stateSinkObject.Save(6, &vfs.anonBlockDevMinorNext)
  2086  	stateSinkObject.Save(7, &vfs.anonBlockDevMinor)
  2087  	stateSinkObject.Save(8, &vfs.fsTypes)
  2088  	stateSinkObject.Save(9, &vfs.filesystems)
  2089  	stateSinkObject.Save(10, &vfs.groupIDBitmap)
  2090  	stateSinkObject.Save(11, &vfs.mountPromises)
  2091  	stateSinkObject.Save(12, &vfs.toDecRef)
  2092  }
  2093  
  2094  func (vfs *VirtualFilesystem) afterLoad(context.Context) {}
  2095  
  2096  // +checklocksignore
  2097  func (vfs *VirtualFilesystem) StateLoad(ctx context.Context, stateSourceObject state.Source) {
  2098  	stateSourceObject.Load(1, &vfs.mountpoints)
  2099  	stateSourceObject.Load(2, &vfs.lastMountID)
  2100  	stateSourceObject.Load(3, &vfs.anonMount)
  2101  	stateSourceObject.Load(4, &vfs.devices)
  2102  	stateSourceObject.Load(5, &vfs.dynCharDevMajorUsed)
  2103  	stateSourceObject.Load(6, &vfs.anonBlockDevMinorNext)
  2104  	stateSourceObject.Load(7, &vfs.anonBlockDevMinor)
  2105  	stateSourceObject.Load(8, &vfs.fsTypes)
  2106  	stateSourceObject.Load(9, &vfs.filesystems)
  2107  	stateSourceObject.Load(10, &vfs.groupIDBitmap)
  2108  	stateSourceObject.Load(11, &vfs.mountPromises)
  2109  	stateSourceObject.Load(12, &vfs.toDecRef)
  2110  	stateSourceObject.LoadValue(0, new([]*Mount), func(y any) { vfs.loadMounts(ctx, y.([]*Mount)) })
  2111  }
  2112  
  2113  func (p *PathOperation) StateTypeName() string {
  2114  	return "pkg/sentry/vfs.PathOperation"
  2115  }
  2116  
  2117  func (p *PathOperation) StateFields() []string {
  2118  	return []string{
  2119  		"Root",
  2120  		"Start",
  2121  		"Path",
  2122  		"FollowFinalSymlink",
  2123  	}
  2124  }
  2125  
  2126  func (p *PathOperation) beforeSave() {}
  2127  
  2128  // +checklocksignore
  2129  func (p *PathOperation) StateSave(stateSinkObject state.Sink) {
  2130  	p.beforeSave()
  2131  	stateSinkObject.Save(0, &p.Root)
  2132  	stateSinkObject.Save(1, &p.Start)
  2133  	stateSinkObject.Save(2, &p.Path)
  2134  	stateSinkObject.Save(3, &p.FollowFinalSymlink)
  2135  }
  2136  
  2137  func (p *PathOperation) afterLoad(context.Context) {}
  2138  
  2139  // +checklocksignore
  2140  func (p *PathOperation) StateLoad(ctx context.Context, stateSourceObject state.Source) {
  2141  	stateSourceObject.Load(0, &p.Root)
  2142  	stateSourceObject.Load(1, &p.Start)
  2143  	stateSourceObject.Load(2, &p.Path)
  2144  	stateSourceObject.Load(3, &p.FollowFinalSymlink)
  2145  }
  2146  
  2147  func (vd *VirtualDentry) StateTypeName() string {
  2148  	return "pkg/sentry/vfs.VirtualDentry"
  2149  }
  2150  
  2151  func (vd *VirtualDentry) StateFields() []string {
  2152  	return []string{
  2153  		"mount",
  2154  		"dentry",
  2155  	}
  2156  }
  2157  
  2158  func (vd *VirtualDentry) beforeSave() {}
  2159  
  2160  // +checklocksignore
  2161  func (vd *VirtualDentry) StateSave(stateSinkObject state.Sink) {
  2162  	vd.beforeSave()
  2163  	stateSinkObject.Save(0, &vd.mount)
  2164  	stateSinkObject.Save(1, &vd.dentry)
  2165  }
  2166  
  2167  func (vd *VirtualDentry) afterLoad(context.Context) {}
  2168  
  2169  // +checklocksignore
  2170  func (vd *VirtualDentry) StateLoad(ctx context.Context, stateSourceObject state.Source) {
  2171  	stateSourceObject.Load(0, &vd.mount)
  2172  	stateSourceObject.Load(1, &vd.dentry)
  2173  }
  2174  
  2175  func init() {
  2176  	state.Register((*anonFilesystemType)(nil))
  2177  	state.Register((*anonFilesystem)(nil))
  2178  	state.Register((*anonDentry)(nil))
  2179  	state.Register((*Dentry)(nil))
  2180  	state.Register((*DeviceKind)(nil))
  2181  	state.Register((*devTuple)(nil))
  2182  	state.Register((*registeredDevice)(nil))
  2183  	state.Register((*RegisterDeviceOptions)(nil))
  2184  	state.Register((*EpollInstance)(nil))
  2185  	state.Register((*epollInterestKey)(nil))
  2186  	state.Register((*epollInterest)(nil))
  2187  	state.Register((*epollInterestList)(nil))
  2188  	state.Register((*epollInterestEntry)(nil))
  2189  	state.Register((*eventList)(nil))
  2190  	state.Register((*eventEntry)(nil))
  2191  	state.Register((*FileDescription)(nil))
  2192  	state.Register((*FileDescriptionOptions)(nil))
  2193  	state.Register((*Dirent)(nil))
  2194  	state.Register((*FileDescriptionDefaultImpl)(nil))
  2195  	state.Register((*DirectoryFileDescriptionDefaultImpl)(nil))
  2196  	state.Register((*DentryMetadataFileDescriptionImpl)(nil))
  2197  	state.Register((*StaticData)(nil))
  2198  	state.Register((*DynamicBytesFileDescriptionImpl)(nil))
  2199  	state.Register((*LockFD)(nil))
  2200  	state.Register((*NoLockFD)(nil))
  2201  	state.Register((*BadLockFD)(nil))
  2202  	state.Register((*FileDescriptionRefs)(nil))
  2203  	state.Register((*Filesystem)(nil))
  2204  	state.Register((*PrependPathAtVFSRootError)(nil))
  2205  	state.Register((*PrependPathAtNonMountRootError)(nil))
  2206  	state.Register((*PrependPathSyntheticError)(nil))
  2207  	state.Register((*FilesystemRefs)(nil))
  2208  	state.Register((*registeredFilesystemType)(nil))
  2209  	state.Register((*RegisterFilesystemTypeOptions)(nil))
  2210  	state.Register((*EventType)(nil))
  2211  	state.Register((*Inotify)(nil))
  2212  	state.Register((*Watches)(nil))
  2213  	state.Register((*Watch)(nil))
  2214  	state.Register((*Event)(nil))
  2215  	state.Register((*FileLocks)(nil))
  2216  	state.Register((*Mount)(nil))
  2217  	state.Register((*umountRecursiveOptions)(nil))
  2218  	state.Register((*followerList)(nil))
  2219  	state.Register((*followerEntry)(nil))
  2220  	state.Register((*namespaceRefs)(nil))
  2221  	state.Register((*mountEntry)(nil))
  2222  	state.Register((*MountNamespace)(nil))
  2223  	state.Register((*opathFD)(nil))
  2224  	state.Register((*GetDentryOptions)(nil))
  2225  	state.Register((*MkdirOptions)(nil))
  2226  	state.Register((*MknodOptions)(nil))
  2227  	state.Register((*MountFlags)(nil))
  2228  	state.Register((*MountOptions)(nil))
  2229  	state.Register((*OpenOptions)(nil))
  2230  	state.Register((*ReadOptions)(nil))
  2231  	state.Register((*RenameOptions)(nil))
  2232  	state.Register((*SetStatOptions)(nil))
  2233  	state.Register((*BoundEndpointOptions)(nil))
  2234  	state.Register((*GetXattrOptions)(nil))
  2235  	state.Register((*SetXattrOptions)(nil))
  2236  	state.Register((*StatOptions)(nil))
  2237  	state.Register((*UmountOptions)(nil))
  2238  	state.Register((*WriteOptions)(nil))
  2239  	state.Register((*AccessTypes)(nil))
  2240  	state.Register((*ResolvingPath)(nil))
  2241  	state.Register((*resolveMountRootOrJumpError)(nil))
  2242  	state.Register((*resolveMountPointError)(nil))
  2243  	state.Register((*resolveAbsSymlinkError)(nil))
  2244  	state.Register((*RestoreID)(nil))
  2245  	state.Register((*VirtualFilesystem)(nil))
  2246  	state.Register((*PathOperation)(nil))
  2247  	state.Register((*VirtualDentry)(nil))
  2248  }