Skip to content

Commit

Permalink
allows setting volatile overlay mount option
Browse files Browse the repository at this point in the history
given that buildkit is generally very IO intensive, some preliminary
tests have shown that adding the volatile option could yield up to
a 15% performance improvements in some cases.

ref: https://docs.kernel.org/filesystems/overlayfs.html#volatile-mount

Signed-off-by: Marcos Lilljedahl <[email protected]>
  • Loading branch information
marcosnils committed Sep 29, 2024
1 parent 185751b commit 3ab3ae4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion util/overlay/overlay_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ func GetOverlayLayers(m mount.Mount) ([]string, error) {
for i, j := 0, len(l)-1; i < j; i, j = i+1, j-1 {
l[i], l[j] = l[j], l[i] // make l[0] = bottommost
}
} else if strings.HasPrefix(o, "workdir=") || o == "index=off" || o == "userxattr" || strings.HasPrefix(o, "redirect_dir=") {
} else if strings.HasPrefix(o, "workdir=") || o == "index=off" || o == "userxattr" || strings.HasPrefix(o, "redirect_dir=") || o == "volatile" {
// these options are possible to specfied by the snapshotter but not indicate dir locations.
continue
} else {
Expand Down

0 comments on commit 3ab3ae4

Please sign in to comment.