From 52e2a2421699543217331cc15d5a9bdad0fe776b Mon Sep 17 00:00:00 2001 From: Nick Labich Date: Fri, 25 Apr 2025 01:38:04 -0400 Subject: [PATCH] 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 --- src/sysext/sysext.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sysext/sysext.c b/src/sysext/sysext.c index 201787b2517..765d315b73c 100644 --- a/src/sysext/sysext.c +++ b/src/sysext/sysext.c @@ -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(); } -- 2.47.3