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

Look into new mount api for providing overlayfs layers via fds #64

Open
allisonkarlitskaya opened this issue Jan 30, 2025 · 4 comments
Open

Comments

@allisonkarlitskaya
Copy link
Collaborator

No description provided.

@allisonkarlitskaya
Copy link
Collaborator Author

Using fsconfig_set_fd() for the overlayfs "lowerdir+" with the return value of fsmount() for the erofs is failing with EBADF on the 6.13.0 kernel in rawhide.

The place inside the kernel that this is most likely coming from is trying to get the fd with FMODE_PATH. https://github.com/brauner/man-pages-md/blob/main/fsmount.md says that the returned fd "looks like the one created by open() with O_PATH"...

Not exactly sure what's going wrong here.

@allisonkarlitskaya
Copy link
Collaborator Author

So I read it wrong: the mask being passed through on fget is intended to reject those bits, so FMODE_PATH rejects O_PATH fds. I'm not sure if that's intentional or not.

Trying to pass in an anonymous mount fd that I've reopened via openat(mount_fd, ".", O_RDONLY) gets further but fails on the attempt to actually create the mount with an error about "failed to clone lowerpath".

It's not clear to me if it is intended to use this stuff with raw mounted fds that haven't been associated with a mountpoint yet.

@allisonkarlitskaya
Copy link
Collaborator Author

So this conversation is happening: https://lore.kernel.org/linux-unionfs/[email protected]/T/#m47bc7194333c2ea942e62adb4e8d843c4b494a7d

Looks like we just need to wait a bit longer for this...

@allisonkarlitskaya
Copy link
Collaborator Author

My feeling on if we should make use of this API or not depends on if a kernel with this feature will land in Fedora 42 or not... We already need features that aren't available in 41, so we may as well go all the way, but if it means we need to continue to depend on Rawhide even after Fedora 42 is released, then I don't want to do it.

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

1 participant