-
Notifications
You must be signed in to change notification settings - Fork 68
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
Fuse OverlayFs implementation #156
Conversation
2b5ca30
to
cd5987c
Compare
xfstests CI action costs about 39min, one example log: https://github.com/WeiZhang555/fuse-backend-rs/actions/runs/6322500147/job/17168241410 |
6031c63
to
48dcb15
Compare
dc5b618
to
e30c271
Compare
@@ -30,6 +30,11 @@ pub use async_io::{AsyncFileSystem, AsyncZeroCopyReader, AsyncZeroCopyWriter}; | |||
mod sync_io; | |||
pub use sync_io::FileSystem; | |||
|
|||
#[cfg(all(any(feature = "fusedev", feature = "virtiofs"), target_os = "linux"))] |
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.
It would be preferrable to mount overlayfs inside guest, so is there any need to turn on overlayfs for virtiofs?
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.
The idea of Fuse OverlayFS is to take over Container RootFs totally through Nydus and Fuse-backend-rs, so I suppose mounting overlayfs on host is strong requirement.
Besides, the OverlayFs replies heavily on Passthroughfs currently, so I copied #[cfg] for 'passthroughfs' from src/lib.rs
:
#[cfg(all(any(feature = "fusedev", feature = "virtiofs"), target_os = "linux"))]
pub mod passthrough;
df8537a
to
1af13d1
Compare
1fdbb6b
to
1b20bbd
Compare
Add unionmount-testsuite as Overlay function test cases, this gave us more confidence on the functionality. |
8f623a5
to
757cec5
Compare
757cec5
to
b9a541f
Compare
The Integration into Nydus can be seen in Nydus PR |
a001087
to
e5bce4a
Compare
ping @hhhhsdxxxx @jiangliu @eryugey |
lgtm |
Add first implementation of overlay fs which can imitate kernel overlay fs. This allow you to customize a union fs with many customized layers, for example, one passthrough fs as upper layer and one NFS as lower layer. This can be quite useful for some projects relying on fuse-backend-rs, e.g. Nydus, which can add writable upper layer on readonly RAFS lower layer, to act as a complete container rootfs. More details will be added in docs. Signed-off-by: Yang Bo <[email protected]>
e5bce4a
to
a9c41b1
Compare
This commit refactor a lot to previous one, including: * Modified layer trait * Lots of bugfixes to make xfstests happy. * Performance improvement. * Whiteout logics * Remove plugin & Direct layer logics. * A better inode allocator with inode consistency guarantee. Signed-off-by: Wei Zhang <[email protected]>
Add xfstests into CI for overlayfs, it will work as Github Actions. Currently not all test cases can be run, only about half of `generic/*` for the Fuse Overlay FS, some test cases are expected to fail due to missing function implementation, little are unexpected due to potential bugs which will be investigated laterly. Signed-off-by: Wei Zhang <[email protected]>
Add basic introduction for overlay fs implementations, also architecture design are illustrated. Signed-off-by: Wei Zhang <[email protected]>
Add unionmount-testsuite into CI for Overlay implementation Signed-off-by: Wei Zhang <[email protected]>
a9c41b1
to
cec82c2
Compare
These commits add first implementation of userspace OverlayFs, which aims to add writable upper layer for Nydus, and makes Nydus capable to get more control over user's file writing behavior.
The implementation refers a lot to kernel Overlay Fs, but there're still some differences due to limitation of Fuse
protocol. And the first implementation is not perfect but could be a start.
It was tested under
xfstest
testsuite, about 300+ test cases were tested and only 25 failed as designed or being limited by Fuse. I'll add external CI process later to makexfstest
workable later.Let me know your review opinions.