github.com/MerlinKodo/gvisor@v0.0.0-20231110090155-957f62ecf90e/pkg/sentry/fsimpl/overlay/overlay_state_autogen.go (about)

     1  // automatically generated by stateify.
     2  
     3  package overlay
     4  
     5  import (
     6  	"github.com/MerlinKodo/gvisor/pkg/state"
     7  )
     8  
     9  func (fd *directoryFD) StateTypeName() string {
    10  	return "pkg/sentry/fsimpl/overlay.directoryFD"
    11  }
    12  
    13  func (fd *directoryFD) StateFields() []string {
    14  	return []string{
    15  		"fileDescription",
    16  		"DirectoryFileDescriptionDefaultImpl",
    17  		"DentryMetadataFileDescriptionImpl",
    18  		"off",
    19  		"dirents",
    20  	}
    21  }
    22  
    23  func (fd *directoryFD) beforeSave() {}
    24  
    25  // +checklocksignore
    26  func (fd *directoryFD) StateSave(stateSinkObject state.Sink) {
    27  	fd.beforeSave()
    28  	stateSinkObject.Save(0, &fd.fileDescription)
    29  	stateSinkObject.Save(1, &fd.DirectoryFileDescriptionDefaultImpl)
    30  	stateSinkObject.Save(2, &fd.DentryMetadataFileDescriptionImpl)
    31  	stateSinkObject.Save(3, &fd.off)
    32  	stateSinkObject.Save(4, &fd.dirents)
    33  }
    34  
    35  func (fd *directoryFD) afterLoad() {}
    36  
    37  // +checklocksignore
    38  func (fd *directoryFD) StateLoad(stateSourceObject state.Source) {
    39  	stateSourceObject.Load(0, &fd.fileDescription)
    40  	stateSourceObject.Load(1, &fd.DirectoryFileDescriptionDefaultImpl)
    41  	stateSourceObject.Load(2, &fd.DentryMetadataFileDescriptionImpl)
    42  	stateSourceObject.Load(3, &fd.off)
    43  	stateSourceObject.Load(4, &fd.dirents)
    44  }
    45  
    46  func (fstype *FilesystemType) StateTypeName() string {
    47  	return "pkg/sentry/fsimpl/overlay.FilesystemType"
    48  }
    49  
    50  func (fstype *FilesystemType) StateFields() []string {
    51  	return []string{}
    52  }
    53  
    54  func (fstype *FilesystemType) beforeSave() {}
    55  
    56  // +checklocksignore
    57  func (fstype *FilesystemType) StateSave(stateSinkObject state.Sink) {
    58  	fstype.beforeSave()
    59  }
    60  
    61  func (fstype *FilesystemType) afterLoad() {}
    62  
    63  // +checklocksignore
    64  func (fstype *FilesystemType) StateLoad(stateSourceObject state.Source) {
    65  }
    66  
    67  func (f *FilesystemOptions) StateTypeName() string {
    68  	return "pkg/sentry/fsimpl/overlay.FilesystemOptions"
    69  }
    70  
    71  func (f *FilesystemOptions) StateFields() []string {
    72  	return []string{
    73  		"UpperRoot",
    74  		"LowerRoots",
    75  	}
    76  }
    77  
    78  func (f *FilesystemOptions) beforeSave() {}
    79  
    80  // +checklocksignore
    81  func (f *FilesystemOptions) StateSave(stateSinkObject state.Sink) {
    82  	f.beforeSave()
    83  	stateSinkObject.Save(0, &f.UpperRoot)
    84  	stateSinkObject.Save(1, &f.LowerRoots)
    85  }
    86  
    87  func (f *FilesystemOptions) afterLoad() {}
    88  
    89  // +checklocksignore
    90  func (f *FilesystemOptions) StateLoad(stateSourceObject state.Source) {
    91  	stateSourceObject.Load(0, &f.UpperRoot)
    92  	stateSourceObject.Load(1, &f.LowerRoots)
    93  }
    94  
    95  func (fs *filesystem) StateTypeName() string {
    96  	return "pkg/sentry/fsimpl/overlay.filesystem"
    97  }
    98  
    99  func (fs *filesystem) StateFields() []string {
   100  	return []string{
   101  		"vfsfs",
   102  		"opts",
   103  		"creds",
   104  		"dirDevMinor",
   105  		"lowerDevMinors",
   106  		"dirInoCache",
   107  		"lastDirIno",
   108  		"maxFilenameLen",
   109  	}
   110  }
   111  
   112  func (fs *filesystem) beforeSave() {}
   113  
   114  // +checklocksignore
   115  func (fs *filesystem) StateSave(stateSinkObject state.Sink) {
   116  	fs.beforeSave()
   117  	stateSinkObject.Save(0, &fs.vfsfs)
   118  	stateSinkObject.Save(1, &fs.opts)
   119  	stateSinkObject.Save(2, &fs.creds)
   120  	stateSinkObject.Save(3, &fs.dirDevMinor)
   121  	stateSinkObject.Save(4, &fs.lowerDevMinors)
   122  	stateSinkObject.Save(5, &fs.dirInoCache)
   123  	stateSinkObject.Save(6, &fs.lastDirIno)
   124  	stateSinkObject.Save(7, &fs.maxFilenameLen)
   125  }
   126  
   127  func (fs *filesystem) afterLoad() {}
   128  
   129  // +checklocksignore
   130  func (fs *filesystem) StateLoad(stateSourceObject state.Source) {
   131  	stateSourceObject.Load(0, &fs.vfsfs)
   132  	stateSourceObject.Load(1, &fs.opts)
   133  	stateSourceObject.Load(2, &fs.creds)
   134  	stateSourceObject.Load(3, &fs.dirDevMinor)
   135  	stateSourceObject.Load(4, &fs.lowerDevMinors)
   136  	stateSourceObject.Load(5, &fs.dirInoCache)
   137  	stateSourceObject.Load(6, &fs.lastDirIno)
   138  	stateSourceObject.Load(7, &fs.maxFilenameLen)
   139  }
   140  
   141  func (l *layerDevNumber) StateTypeName() string {
   142  	return "pkg/sentry/fsimpl/overlay.layerDevNumber"
   143  }
   144  
   145  func (l *layerDevNumber) StateFields() []string {
   146  	return []string{
   147  		"major",
   148  		"minor",
   149  	}
   150  }
   151  
   152  func (l *layerDevNumber) beforeSave() {}
   153  
   154  // +checklocksignore
   155  func (l *layerDevNumber) StateSave(stateSinkObject state.Sink) {
   156  	l.beforeSave()
   157  	stateSinkObject.Save(0, &l.major)
   158  	stateSinkObject.Save(1, &l.minor)
   159  }
   160  
   161  func (l *layerDevNumber) afterLoad() {}
   162  
   163  // +checklocksignore
   164  func (l *layerDevNumber) StateLoad(stateSourceObject state.Source) {
   165  	stateSourceObject.Load(0, &l.major)
   166  	stateSourceObject.Load(1, &l.minor)
   167  }
   168  
   169  func (l *layerDevNoAndIno) StateTypeName() string {
   170  	return "pkg/sentry/fsimpl/overlay.layerDevNoAndIno"
   171  }
   172  
   173  func (l *layerDevNoAndIno) StateFields() []string {
   174  	return []string{
   175  		"layerDevNumber",
   176  		"ino",
   177  	}
   178  }
   179  
   180  func (l *layerDevNoAndIno) beforeSave() {}
   181  
   182  // +checklocksignore
   183  func (l *layerDevNoAndIno) StateSave(stateSinkObject state.Sink) {
   184  	l.beforeSave()
   185  	stateSinkObject.Save(0, &l.layerDevNumber)
   186  	stateSinkObject.Save(1, &l.ino)
   187  }
   188  
   189  func (l *layerDevNoAndIno) afterLoad() {}
   190  
   191  // +checklocksignore
   192  func (l *layerDevNoAndIno) StateLoad(stateSourceObject state.Source) {
   193  	stateSourceObject.Load(0, &l.layerDevNumber)
   194  	stateSourceObject.Load(1, &l.ino)
   195  }
   196  
   197  func (d *dentry) StateTypeName() string {
   198  	return "pkg/sentry/fsimpl/overlay.dentry"
   199  }
   200  
   201  func (d *dentry) StateFields() []string {
   202  	return []string{
   203  		"vfsd",
   204  		"refs",
   205  		"fs",
   206  		"mode",
   207  		"uid",
   208  		"gid",
   209  		"copiedUp",
   210  		"parent",
   211  		"name",
   212  		"children",
   213  		"dirents",
   214  		"upperVD",
   215  		"lowerVDs",
   216  		"inlineLowerVDs",
   217  		"devMajor",
   218  		"devMinor",
   219  		"ino",
   220  		"lowerMappings",
   221  		"wrappedMappable",
   222  		"isMappable",
   223  		"locks",
   224  		"watches",
   225  	}
   226  }
   227  
   228  func (d *dentry) beforeSave() {}
   229  
   230  // +checklocksignore
   231  func (d *dentry) StateSave(stateSinkObject state.Sink) {
   232  	d.beforeSave()
   233  	stateSinkObject.Save(0, &d.vfsd)
   234  	stateSinkObject.Save(1, &d.refs)
   235  	stateSinkObject.Save(2, &d.fs)
   236  	stateSinkObject.Save(3, &d.mode)
   237  	stateSinkObject.Save(4, &d.uid)
   238  	stateSinkObject.Save(5, &d.gid)
   239  	stateSinkObject.Save(6, &d.copiedUp)
   240  	stateSinkObject.Save(7, &d.parent)
   241  	stateSinkObject.Save(8, &d.name)
   242  	stateSinkObject.Save(9, &d.children)
   243  	stateSinkObject.Save(10, &d.dirents)
   244  	stateSinkObject.Save(11, &d.upperVD)
   245  	stateSinkObject.Save(12, &d.lowerVDs)
   246  	stateSinkObject.Save(13, &d.inlineLowerVDs)
   247  	stateSinkObject.Save(14, &d.devMajor)
   248  	stateSinkObject.Save(15, &d.devMinor)
   249  	stateSinkObject.Save(16, &d.ino)
   250  	stateSinkObject.Save(17, &d.lowerMappings)
   251  	stateSinkObject.Save(18, &d.wrappedMappable)
   252  	stateSinkObject.Save(19, &d.isMappable)
   253  	stateSinkObject.Save(20, &d.locks)
   254  	stateSinkObject.Save(21, &d.watches)
   255  }
   256  
   257  // +checklocksignore
   258  func (d *dentry) StateLoad(stateSourceObject state.Source) {
   259  	stateSourceObject.Load(0, &d.vfsd)
   260  	stateSourceObject.Load(1, &d.refs)
   261  	stateSourceObject.Load(2, &d.fs)
   262  	stateSourceObject.Load(3, &d.mode)
   263  	stateSourceObject.Load(4, &d.uid)
   264  	stateSourceObject.Load(5, &d.gid)
   265  	stateSourceObject.Load(6, &d.copiedUp)
   266  	stateSourceObject.Load(7, &d.parent)
   267  	stateSourceObject.Load(8, &d.name)
   268  	stateSourceObject.Load(9, &d.children)
   269  	stateSourceObject.Load(10, &d.dirents)
   270  	stateSourceObject.Load(11, &d.upperVD)
   271  	stateSourceObject.Load(12, &d.lowerVDs)
   272  	stateSourceObject.Load(13, &d.inlineLowerVDs)
   273  	stateSourceObject.Load(14, &d.devMajor)
   274  	stateSourceObject.Load(15, &d.devMinor)
   275  	stateSourceObject.Load(16, &d.ino)
   276  	stateSourceObject.Load(17, &d.lowerMappings)
   277  	stateSourceObject.Load(18, &d.wrappedMappable)
   278  	stateSourceObject.Load(19, &d.isMappable)
   279  	stateSourceObject.Load(20, &d.locks)
   280  	stateSourceObject.Load(21, &d.watches)
   281  	stateSourceObject.AfterLoad(d.afterLoad)
   282  }
   283  
   284  func (fd *fileDescription) StateTypeName() string {
   285  	return "pkg/sentry/fsimpl/overlay.fileDescription"
   286  }
   287  
   288  func (fd *fileDescription) StateFields() []string {
   289  	return []string{
   290  		"vfsfd",
   291  		"FileDescriptionDefaultImpl",
   292  		"LockFD",
   293  	}
   294  }
   295  
   296  func (fd *fileDescription) beforeSave() {}
   297  
   298  // +checklocksignore
   299  func (fd *fileDescription) StateSave(stateSinkObject state.Sink) {
   300  	fd.beforeSave()
   301  	stateSinkObject.Save(0, &fd.vfsfd)
   302  	stateSinkObject.Save(1, &fd.FileDescriptionDefaultImpl)
   303  	stateSinkObject.Save(2, &fd.LockFD)
   304  }
   305  
   306  func (fd *fileDescription) afterLoad() {}
   307  
   308  // +checklocksignore
   309  func (fd *fileDescription) StateLoad(stateSourceObject state.Source) {
   310  	stateSourceObject.Load(0, &fd.vfsfd)
   311  	stateSourceObject.Load(1, &fd.FileDescriptionDefaultImpl)
   312  	stateSourceObject.Load(2, &fd.LockFD)
   313  }
   314  
   315  func (fd *regularFileFD) StateTypeName() string {
   316  	return "pkg/sentry/fsimpl/overlay.regularFileFD"
   317  }
   318  
   319  func (fd *regularFileFD) StateFields() []string {
   320  	return []string{
   321  		"fileDescription",
   322  		"copiedUp",
   323  		"cachedFD",
   324  		"cachedFlags",
   325  	}
   326  }
   327  
   328  func (fd *regularFileFD) beforeSave() {}
   329  
   330  // +checklocksignore
   331  func (fd *regularFileFD) StateSave(stateSinkObject state.Sink) {
   332  	fd.beforeSave()
   333  	stateSinkObject.Save(0, &fd.fileDescription)
   334  	stateSinkObject.Save(1, &fd.copiedUp)
   335  	stateSinkObject.Save(2, &fd.cachedFD)
   336  	stateSinkObject.Save(3, &fd.cachedFlags)
   337  }
   338  
   339  func (fd *regularFileFD) afterLoad() {}
   340  
   341  // +checklocksignore
   342  func (fd *regularFileFD) StateLoad(stateSourceObject state.Source) {
   343  	stateSourceObject.Load(0, &fd.fileDescription)
   344  	stateSourceObject.Load(1, &fd.copiedUp)
   345  	stateSourceObject.Load(2, &fd.cachedFD)
   346  	stateSourceObject.Load(3, &fd.cachedFlags)
   347  }
   348  
   349  func init() {
   350  	state.Register((*directoryFD)(nil))
   351  	state.Register((*FilesystemType)(nil))
   352  	state.Register((*FilesystemOptions)(nil))
   353  	state.Register((*filesystem)(nil))
   354  	state.Register((*layerDevNumber)(nil))
   355  	state.Register((*layerDevNoAndIno)(nil))
   356  	state.Register((*dentry)(nil))
   357  	state.Register((*fileDescription)(nil))
   358  	state.Register((*regularFileFD)(nil))
   359  }