Generalize safe host-to-isolated rename migration
This commit is contained in:
parent
aaee63a6e3
commit
35ab7f17c0
1 changed files with 589 additions and 81 deletions
28
patches/gvisor-9f8f6c917-per-description-file-handles.patch
Normal file
28
patches/gvisor-9f8f6c917-per-description-file-handles.patch
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
diff --git a/runsc/boot/vfs.go b/runsc/boot/vfs.go
|
||||
index b34854d4c..b250b78c8 100644
|
||||
--- a/runsc/boot/vfs.go
|
||||
+++ b/runsc/boot/vfs.go
|
||||
@@ -330,6 +330,9 @@ func goferMountData(fd int, fa config.FileAccessType, conf *config.Config, suppre
|
||||
if fa == config.FileAccessShared {
|
||||
opts = append(opts, "cache=remote_revalidating")
|
||||
}
|
||||
+ if suppressDirectFS {
|
||||
+ opts = append(opts, "disable_file_handle_sharing")
|
||||
+ }
|
||||
if conf.DirectFS && !suppressDirectFS {
|
||||
opts = append(opts, "directfs")
|
||||
}
|
||||
diff --git a/runsc/boot/vfs_test.go b/runsc/boot/vfs_test.go
|
||||
index 17ec62bdd..31a103d28 100644
|
||||
--- a/runsc/boot/vfs_test.go
|
||||
+++ b/runsc/boot/vfs_test.go
|
||||
@@ -108,6 +108,9 @@ func TestGoferMountDataDirectFS(t *testing.T) {
|
||||
if gotEnabled != tc.wantEnabled {
|
||||
t.Errorf("directfs option present = %t, want %t (opts=%v)", gotEnabled, tc.wantEnabled, opts)
|
||||
}
|
||||
+ if got := slices.Contains(opts, "disable_file_handle_sharing"); got != tc.suppressDirectFS {
|
||||
+ t.Errorf("disable_file_handle_sharing option present = %t, want %t (opts=%v)", got, tc.suppressDirectFS, opts)
|
||||
+ }
|
||||
})
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue