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

Test for overlayfs will need --xino flag to work #5

Closed
Cypresslin opened this issue Dec 21, 2020 · 3 comments
Closed

Test for overlayfs will need --xino flag to work #5

Cypresslin opened this issue Dec 21, 2020 · 3 comments

Comments

@Cypresslin
Copy link

Hello,

we found that since commit 0787081 ("Add support for user defined mount options") the command to run overlayfs test is not working anymore, it will fail with:

Running './run --ov'
/mnt/a/foo100: File not on union layer
Environment variables:

***
*** ./run --ov --xino open-plain
***
TEST open-plain.py:10: Open O_RDONLY

With some further research I found the mount command has changed.
Compare with the previous working mount command from mount_union.py:

  • Working (019085f "Relax layers check for older kernels"):
    mount -t overlay overlay /mnt -orw,
    redirect_dir=on,xino=on,lowerdir=/lower,upperdir=/upper/0/u,workdir=/upper/0/w

  • Not working (95be14e "Allow user provided options with or without -o")
    mount -t overlay overlay /mnt -orw,
    redirect_dir=on -olowerdir=/lower,upperdir=/upper/0/u,workdir=/upper/0/w

It's missing xino=on, so it looks like you need the --xino flag to enable it, and indeed the cases can pass with this flag.

Is this an expected behaviour? (Maybe the README needs to be updated with --xino flag added to test command examples)
Thanks!

@amir73il
Copy link
Owner

Not expected, but I suspect you are testing with kernel prior to commit
926e94d79baf ("ovl: enable xino automatically in more cases")
and with kernel config
CONFIG_OVERLAY_FS_XINO_AUTO=y
Is that correct?

Please try this fix in run script after line 212:

if redirect_dir is False:
cfg.add_mntopt("redirect_dir=on")
redirect_dir = True

if xino:
cfg.add_mntopt("xino=on")

This will "upgrade" the default xino=auto to xino=on which happens already with kernel >= v5.7
Let me know if it works and I will add this to the code

@Cypresslin
Copy link
Author

Hello,
you're right, it's an Ubuntu Focal 5.4 kernel (5.4.0-58-generic) without commit 926e94d79baf and with CONFIG_OVERLAY_FS_XINO_AUTO set to y

And this fix works.
Thank you!

@amir73il
Copy link
Owner

pushed the fix.
Added you as Reporter/Tester.
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants