Skip to content

Conversation

@dmcgowan
Copy link
Member

Updates testdata to include long prefixes and related tests. In first commit tests are added and fails. The second commit adds support for the prefixes, reading the entire set and caching the prefixes.

Copilot AI review requested due to automatic review settings October 12, 2025 06:07
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for long xattr prefixes to the EROFS filesystem implementation, which was previously unimplemented and would return an error. The changes include reading and caching long prefixes from the filesystem metadata and updating the xattr parsing logic to handle them.

Key changes:

  • Replaces TODO error returns with actual long prefix support in xattr parsing
  • Adds caching mechanism for long prefixes with lazy loading from filesystem metadata
  • Includes comprehensive test coverage for files with long xattr prefixes

Reviewed Changes

Copilot reviewed 4 out of 7 changed files in this pull request and generated 3 comments.

File Description
xattr.go Replaces unimplemented long prefix errors with calls to retrieve cached long prefixes
erofs.go Adds long prefix loading and caching infrastructure with detailed parsing logic
erofs_test.go Adds test cases for files with long xattr prefixes to verify the new functionality
README.md Updates documentation to reflect completed long xattr prefix support

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@dmcgowan dmcgowan force-pushed the long-prefix-support branch 2 times, most recently from 4d7c8d7 to 2b43857 Compare January 31, 2026 08:00
Copilot AI review requested due to automatic review settings January 31, 2026 08:00
@dmcgowan
Copy link
Member Author

Updated

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 7 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@hsiangkao
Copy link
Member

Let's just merge as-is, I need to refactor some part e.g. directory data read should go through regular file read (rathar than directly read on-disk original data), since directories are special files and they support compression too
No need to duplicate read logic just for directories..

@hsiangkao
Copy link
Member

Also, I'm not sure if we'd like to keep test cases in erofs binaries, since previous xz backdoor just leverages random binary data in the source code, it would be helpful to get erofs from scratch.

Btw, this commit needs rebasing so that it can be merged.

Signed-off-by: Derek McGowan <derek@mcg.dev>
Signed-off-by: Derek McGowan <derek@mcg.dev>
Signed-off-by: Derek McGowan <derek@mcg.dev>
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 8 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@dmcgowan
Copy link
Member Author

dmcgowan commented Feb 1, 2026

@hsiangkao sorry, I didn't push the version with the update before, it is updated now using the new read logic

Copy link
Member

@hsiangkao hsiangkao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's merge it as-is for now.

@hsiangkao hsiangkao merged commit 237e4b3 into erofs:main Feb 9, 2026
6 checks passed
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