Skip to content

Commit b1f733b

Browse files
cypharkolyshkin
authored andcommitted
dmz: overlay: set xino=off to disable dmesg spam
If /run/runc and /usr/bin are on different filesystems, overlayfs may enable the xino feature which results in the following log message: kernel: overlayfs: "xino" feature enabled using 3 upper inode bits. Each time we have to protect /proc/self/exe. So disable xino to remove the log message (we don't care about the inode numbers of the files anyway). Signed-off-by: Aleksa Sarai <[email protected]> (cherry picked from commit 9bc42d6) Signed-off-by: lfbzhm <[email protected]>
1 parent 1b42ebc commit b1f733b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

libcontainer/dmz/overlayfs_linux.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,13 @@ func sealedOverlayfs(binPath, tmpDir string) (_ *os.File, Err error) {
8484
return nil, fmt.Errorf("fsconfig set overlayfs lowerdir=%s: %w", lowerDirStr, err)
8585
}
8686

87+
// We don't care about xino (Linux 4.17) but it will be auto-enabled on
88+
// some systems (if /run/runc and /usr/bin are on different filesystems)
89+
// and this produces spurious dmesg log entries. We can safely ignore
90+
// errors when disabling this because we don't actually care about the
91+
// setting and we're just opportunistically disabling it.
92+
_ = unix.FsconfigSetString(int(overlayCtx.Fd()), "xino", "off")
93+
8794
// Get an actual handle to the overlayfs.
8895
if err := unix.FsconfigCreate(int(overlayCtx.Fd())); err != nil {
8996
return nil, os.NewSyscallError("fsconfig create overlayfs", err)

0 commit comments

Comments
 (0)