Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

env: fix handling of long lowerdir paths in newer kernel/mount versions #1164

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions crates/spfs/src/env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1126,11 +1126,12 @@ pub(crate) fn get_overlay_args<P: AsRef<Path>>(
// the rightmost on the command line is the bottom layer, and the
// leftmost is on the top). For more details see:
// https://docs.kernel.org/filesystems/overlayfs.html#multiple-lower-layers
args.push_str("lowerdir=");
for path in layer_dirs.iter().rev() {
args.push_str("lowerdir+=");
args.push_str(&path.as_ref().to_string_lossy());
args.push(':');
args.push(',');
}
args.push_str("lowerdir+=");
args.push_str(&rt.config.lower_dir.to_string_lossy());

args.push_str(",upperdir=");
Expand Down
Loading