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