sysext: Include index=off in overlay mount options

Enable reuse of upper/work dirs with different lower layer paths.

Fixes https://github.com/systemd/systemd/issues/37245
This commit is contained in:
Nick Labich
2025-04-30 13:14:42 +02:00
committed by Lennart Poettering
parent 71c4b42efc
commit 52e2a24216
+2 -2
View File
@@ -736,8 +736,8 @@ static int mount_overlayfs(
if (r < 0)
return r;
/* redirect_dir=on and noatime prevent unnecessary upcopies, metacopy=off prevents broken
* files from partial upcopies after umount. */
if (!strextend(&options, ",redirect_dir=on,noatime,metacopy=off"))
* files from partial upcopies after umount, index=off allows reuse of the upper/work dirs */
if (!strextend(&options, ",redirect_dir=on,noatime,metacopy=off,index=off"))
return log_oom();
}