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

Investigate adding support for erofs #14

Open
chenxiaolong opened this issue Feb 17, 2025 · 1 comment
Open

Investigate adding support for erofs #14

chenxiaolong opened this issue Feb 17, 2025 · 1 comment
Assignees

Comments

@chenxiaolong
Copy link
Owner

I started working on a proof-of-concept implementation for erofs support this weekend and I currently don't plan to work on it any further. Although erofs-utils is split into lib and fuse/mkfs/fsck components, the "library" part isn't really usable as a library.

  • The library components rely on cfg and g_sbi global variables, which are tied to a specific open file. This makes it impossible to operate on more than one erofs image at the same time.

  • Although erofs-utils can compile without including linux/*.h headers, it still depends on Linux-specific behavior. For example, it uses libc's S_IFREG/S_IFDIR/... and makedev/major/minor directly when interacting with filesystem structures. This will fail to compile on Windows and silently do the wrong thing on macOS (where eg. makedev composes the major and minor values differently from Linux).

    e2fsprogs doesn't have this problem because it defines its own constants and macros for anything that's Linux-specific.

  • The library components use application-style logging that are hardcoded to dump the messages into stdout/stderr instead of returning them as part of some error type.

It's not really feasible to integrate erofs-utils with afsr. There is a new Rust implementation of erofs that seems promising, though it's not complete yet: https://github.com/ToolmanP/erofs-rs.

@chenxiaolong chenxiaolong self-assigned this Feb 17, 2025
@chenxiaolong
Copy link
Owner Author

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