Skip to content

fsapfsmount: libfuse3 on macOS support / feature implementation - #87

Open
FraSharp wants to merge 2 commits into
libyal:mainfrom
FraSharp:main
Open

fsapfsmount: libfuse3 on macOS support / feature implementation#87
FraSharp wants to merge 2 commits into
libyal:mainfrom
FraSharp:main

Conversation

@FraSharp

Copy link
Copy Markdown

this implements a tolerant mode feature that allows the filesystem to continue operating even when encountering certain recoverable errors. when enabled, the mount point remains functional by skipping problematic directory entries rather than failing completely. this is particularly useful when dealing with corrupted or partially damaged APFS images where some metadata may be unreadable. the implementation adds a new libfsapfs_volume_set_tolerant_mode() function, introduces a tolerant_mode flag in the volume structure, ensures propagation of this setting to the file system Btree, and modifies the fuse readdir callback to handle errors gracefully based on the mode. it also extends macOS compatibility by adding support for libfuse3 on macOS (tested on 26.3).

* i tested the tolerant mode with -R flag in a directory known to be corrupted.

This extends the FUSE mount code to work on macOS with libfuse3, which uses
different struct types (fuse_darwin_attr instead of stat) and callback
signatures. The changes keep existing support for Linux libfuse3 and older
libfuse/libosxfuse intact by using conditional compilation.
Implement tolerant mode that allows the filesystem to continue
operating when encountering certain errors. When enabled, the
mount_fuse tool will skip problematic directory entries instead
of failing the entire operation.

This adds:
- libfsapfs_volume_set_tolerant_mode() function
- Tolerant mode flag in libfsapfs_volume_t
- Propagation to file system B-tree
- Error handling in mount_fuse_readdir() to skip errors in tolerant mode
@joachimmetz
joachimmetz force-pushed the main branch 2 times, most recently from 185797f to 13b4686 Compare June 13, 2026 13:04
@joachimmetz

Copy link
Copy Markdown
Member

Thanks for the suggested changes. macfuse related changes in https://github.com/libyal/libfsapfs/actions/runs/27749993681/job/82097769144

I'll keep this open for now to assess the error tolerant mode at a later time

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

Successfully merging this pull request may close these issues.

2 participants