]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
sysext: Include index=off in overlay mount options
authorNick Labich <nick@labich.org>
Fri, 25 Apr 2025 05:38:04 +0000 (01:38 -0400)
committerLennart Poettering <lennart@poettering.net>
Wed, 30 Apr 2025 11:14:42 +0000 (13:14 +0200)
Enable reuse of upper/work dirs with different lower layer paths.

Fixes https://github.com/systemd/systemd/issues/37245

src/sysext/sysext.c

index 201787b2517d02c8be6966d91981796d770c1b1d..765d315b73c290c6aef9d0f78d88f78eb4ff3c6c 100644 (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();
         }