implement setup and lookup_root, add inode pruning to hybrid ID#95
Open
khanhtranngoccva wants to merge 8 commits intoAlogani:develfrom
Open
implement setup and lookup_root, add inode pruning to hybrid ID#95khanhtranngoccva wants to merge 8 commits intoAlogani:develfrom
khanhtranngoccva wants to merge 8 commits intoAlogani:develfrom
Conversation
Owner
|
Upon a quick review, nothing i disagree on. I will take a bit more time to merge it because i will merge it with v0.5.0 which will be release in a week or two. Just for information, i will certainly look into more details into for inode_multi_mapper to understand more how it works and see if some logic can be shared with inode_mapper ; and add more comprehensive examples of usages |
Contributor
Author
|
I made a few more changes:
|
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.
This method aims to solve issue #86 by ensuring every inode has at least one chance to have a stable backing ID, as well as making a few major modifications on the hybrid ID to allow for trivial ID creation (to pass into prune(), make it easier to unit test, and separate code concerns).
Here are the changes:
setupmethod that runs pre-mount to allow the implementations to store theTResolvertypes.lookup_rootmethod that runs pre-mount to allow the implementations to return a proper backing ID for the root inode. Currently, if the method is not implemented (ENOSYS), the bootstrapper that runs the code only warns the user.HybridIdno longer has the convenience methods. It is instead moved inside the resolver types, which also allows separation of concerns. It also makes sense, because theHybridId's internal inode might become invalid through a forget() call when the struct is still in scope.I'm also considering that the inode resolver APIs should return an error at
inode_mappinglevel since the user can now pass invalid inodes.