Make the fs Backend dyn-compatible#963
Open
jaybosamiya-ms wants to merge 1 commit into
Open
Conversation
|
ℹ️ Note: This semver check was run against the 🤖 SemverChecks 🤖 Click for details |
wdcui
approved these changes
Jun 26, 2026
wdcui
left a comment
Member
There was a problem hiding this comment.
LGTM. Thanks!
GPT-5.5 reported the following two findings. Please double check them.
-
litebox/src/fs/resolver.rs: O_PATH is accepted, but normal operations on those fds hit unimplemented!(), so a caller can panic LiteBox instead of getting an errno-style error such as EBADF.
-
litebox/src/fs/devices.rs: The devices backend gives / and /dev the same (dev, ino): dev_dir_inode starts at inode 0, and root status also reports inode 0. This breaks inode identity for distinct directories.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#887 introduced the
Backendabstraction to the file system, but as I was working on more functionality, I discovered that the better design is to guarantee thatBackendis dyn-compatible, so that the composition of multiple backends can be done without a huge amount of type-level machinery + macros; it also keeps the interfaces more ergonomic for consumers of LiteBox core. To make things dyn-safe, we need to move out theBackend-specific handles; however, rather than the naive handling of this, there's a convenient abstraction such that backend implementations still end up with a largely convenient way to use their own typed handles.