erofs-differ: implement fast differ with DiffDirChanges()#11603
Merged
Conversation
Member
Author
djdongjin
reviewed
Apr 6, 2025
Member
Author
|
ping... could folks take a look of this? @dmcgowan @fuweid @AkihiroSuda |
AkihiroSuda
approved these changes
Apr 18, 2025
dmcgowan
reviewed
Apr 18, 2025
| return emptyDesc, fmt.Errorf("erofsDiff does not implement Compare method: %w", errdefs.ErrNotImplemented) | ||
| layer, err := erofsutils.MountsToLayer(upper) | ||
| if err != nil { | ||
| return emptyDesc, fmt.Errorf("unsupported layer for erofsDiff Compare method: %w", errdefs.ErrNotImplemented) |
Member
There was a problem hiding this comment.
MountsToLayer already returns a wrapped ErrNotImplemented with a more specific message
Member
Author
There was a problem hiding this comment.
ok, thanks derek. let me fix it now since it doesn't merge for now.
dmcgowan
approved these changes
Apr 18, 2025
Unlike the walking differ, which implements a generic method to accommodate all kinds of snapshotters, the EROFS differ is just implemented for EROFS and EROFS snapshotter so it can utilize the recent DiffDirChanges() [1] to avoid traversing the entire rootfs directory in order to improve `nerdctl commit` performance. Additionally, I think `baseDir` is unnecessary too (in principle, only `upperdir` is useful for OCI format convention). However, addressing this requires more work, so left as is for now. It's also useful to implement a customized Compare() method for EROFS differ so that we can dump the native EROFS-formatted blob to the content store later. [1] containerd/continuity#145 Signed-off-by: Gao Xiang <xiang@kernel.org>
fuweid
approved these changes
Apr 19, 2025
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.
Unlike the walking differ, which implements a generic method to accommodate all kinds of snapshotters, the EROFS differ is just implemented for EROFS and EROFS snapshotter so it can utilize the recent DiffDirChanges() to avoid traversing the entire rootfs directory in order to improve
nerdctl commitperformance.Additionally, I think
baseDiris unnecessary too (in principle, onlyupperdiris useful for OCI format convention). However, addressing this requires more work, so left as is for now.It's also useful to implement a customized Compare() method for EROFS differ so that we can dump the native EROFS-formatted blob to the content store later.