Plumb restore context to afterLoad()

This allows for external information to be passed to restore code, like
host FDs to be remapped.

Updates #1956

PiperOrigin-RevId: 612540749
This commit is contained in:
Fabricio Voznika
2024-03-04 12:21:50 -08:00
committed by gVisor bot
parent c6b06ab1a5
commit c087777e37
46 changed files with 214 additions and 155 deletions
+3 -1
View File
@@ -14,8 +14,10 @@
package devtmpfs
import "context"
// afterLoad is invoked by stateify.
func (fst *FilesystemType) afterLoad() {
func (fst *FilesystemType) afterLoad(context.Context) {
if fst.fs != nil {
// Ensure that we don't create another filesystem.
fst.initOnce.Do(func() {})