You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implement #11504.
Add optional `size=` parameter to `--overlay2` flag: when it is set, overlay upper layer is mounted with given size flag.
Tested:
```
sudo bazel-bin/runsc/runsc_/runsc --overlay2=all:memory,size=1m run --bundle ~/bu cont-i
root@:/# dd if=/dev/urandom of=/x bs=1k count=1000
1000+0 records in
1000+0 records out
1024000 bytes (1.0 MB, 1000 KiB) copied, 0.0109061 s, 93.9 MB/s
root@:/# dd if=/dev/urandom of=/x bs=1k count=1100
dd: error writing '/x': No space left on device
1021+0 records in
1020+0 records out
1044480 bytes (1.0 MB, 1020 KiB) copied, 0.011396 s, 91.7 MB/s
```
```
-overlay
DEPRECATED: use --overlay2=all:memory to achieve the same effect
-overlay2 value
wrap mounts with overlayfs. Format is
* 'none' to turn overlay mode off
* {mount}:{medium}[size={size}], where
'mount' can be 'root' or 'all'
'medium' can be 'memory', 'self' or 'dir=/abs/dir/path' in which filestore will be created
'size' optional parameter overrides default overlay upper layer size
(default root:self)
-panic-log string
file path where panic reports and other Go's runtime messages are written.
```
FUTURE_COPYBARA_INTEGRATE_REVIEW=#11723 from stepancheg:overlay-size 32c91c3
PiperOrigin-RevId: 764885043
flagSet.Var(fileAccessTypePtr(FileAccessExclusive), "file-access", "specifies which filesystem validation to use for the root mount: exclusive (default), shared.")
120
120
flagSet.Var(fileAccessTypePtr(FileAccessShared), "file-access-mounts", "specifies which filesystem validation to use for volumes other than the root mount: shared (default), exclusive.")
121
121
flagSet.Bool("overlay", false, "DEPRECATED: use --overlay2=all:memory to achieve the same effect")
122
-
flagSet.Var(defaultOverlay2(), flagOverlay2, "wrap mounts with overlayfs. Format is {mount}:{medium}, where 'mount' can be 'root' or 'all' and medium can be 'memory', 'self' or 'dir=/abs/dir/path' in which filestore will be created. 'none' will turn overlay mode off.")
122
+
flagSet.Var(defaultOverlay2(), flagOverlay2, "wrap mounts with overlayfs. Format is\n"+
123
+
"* 'none' to turn overlay mode off\n"+
124
+
"* {mount}:{medium}[,size={size}], where\n"+
125
+
" 'mount' can be 'root' or 'all'\n"+
126
+
" 'medium' can be 'memory', 'self' or 'dir=/abs/dir/path' in which filestore will be created\n"+
0 commit comments