-
Notifications
You must be signed in to change notification settings - Fork 76
Resolved some dmesg errors (#104) #208
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
base: main
Are you sure you want to change the base?
Conversation
looking at the docs for xino, I am curious to see what would now break when it's set to off. However, from the looks of it, both seems quite useful(?) I am not sure if we should disable them. |
mgree
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can turn index off, but we need to dig a little more for xino.
try
Outdated
| lowerdirs="$2" | ||
| overlay_mountpoint="$3" | ||
| mount -t overlay overlay -o userxattr -o "lowerdir=$lowerdirs,upperdir=$sandbox_dir/upperdir/$overlay_mountpoint,workdir=$sandbox_dir/workdir/$overlay_mountpoint" "$sandbox_dir/temproot/$overlay_mountpoint" | ||
| mount -t overlay overlay -o userxattr -o "lowerdir=$lowerdirs,upperdir=$sandbox_dir/upperdir/$overlay_mountpoint,workdir=$sandbox_dir/workdir/$overlay_mountpoint,index=off,xino=off" "$sandbox_dir/temproot/$overlay_mountpoint" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
index is being disabled automatically for our upper, so it's safe to turn that off. xino should only be turned off when we know pre-emptively that it's going to fail... can we identify the fs types that's true for, and only disable it for those overlays?
mgree
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a bad start!
- Would be good to have a more thorough enumeration of which fs types work without a merger.
- The
fs_fail_flaglogic doesn't seem right to me.
| mountpoint="$1" | ||
| fstype=$(stat -f -c %T "$mountpoint") | ||
| if [[ "$fstype" = "msdos" || "$fstype" = "exfat" || "$fstype" = "hfs" || "$fstype" = "hfs+" ]]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[[ ... ]] is a bashism. but also, if COND; then return 1; fi return 0 is really just ! COND. To save on processes, we probably want:
| if [[ "$fstype" = "msdos" || "$fstype" = "exfat" || "$fstype" = "hfs" || "$fstype" = "hfs+" ]]; then | |
| case "$fstype" in | |
| (msdos|exfat|hfs|hfs+) returrn 1;; | |
| (*) return 0;; | |
| esac |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this an exhaustive list? Can we not do it for ext3/4?
| mount -t overlay overlay -o userxattr -o "lowerdir=$lowerdirs,upperdir=$sandbox_dir/upperdir/$overlay_mountpoint,workdir=$sandbox_dir/workdir/$overlay_mountpoint,index=off" "$sandbox_dir/temproot/$overlay_mountpoint" | ||
| } | ||
| check_fstype() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| check_fstype() { | |
| mountable_without_mergerfs() { |
| fs_fail_flag=0 | ||
| if check_fstype "$pure_mountpoint"; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| if check_fstype "$pure_mountpoint"; then | |
| if ! mountable_without_mergerfs "$pure_mountpoint" | |
| then | |
| needs_mergerfs=1 | |
| fi |
And then... we ought to break out early. If any mount requires a mergerfs, we should give up early and just use mergerfs. Right?
Resolved "upper fs does not support file handles, falling back to index=off" and " fs on 'tmp' does not support file handles, falling back to xino=off"