erofs: spill xattrs to shared area when exceeding inode stride #139
All Vouch review confidence checks passed
Residual risk 0.14 = Change Risk (0.37) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.37 · 217 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.322
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #139"
general
weight: 0.35
justinsb
Follow-up to #94 / #113. Prerequisite for #108 and #129.
Fixes #137
Summary of Changes
1. Shared Xattr Spilling & Deduplication in
WriteImage:- Evaluates each inode's inline xattr footprint against the 8-slot stride limit (
DefaultInodeStride * SlotSize).- Keeps attributes inline when they fit within the stride.
- Spills larger attributes to the EROFS shared xattr table (largest first) when stride limits would be exceeded, referencing them with a 4-byte
xattr_id.- Deduplicates identical shared xattr entries across all inodes in the shared xattr block area.
- Sets
Superblock.XattrBlkaddrand writes shared xattr table blocks.2. Reader & Fsck Support:
- Implements shared xattr lookup in
ReadXattrsandGetXattrs.- Validates
XattrBlkaddrand verifies xattr integrity duringFsck.3. Per-Inode Budget & Error Context:
- Enforces the per-inode maximum reference capacity (up to 45 shared xattrs for extended inodes in 8 slots).
- If an inode's attributes cannot fit even when shared,
WriteImagerejects it with an error explicitly detailing the path, inode ID, attribute count, and capacity.4. Testing:
- Added
TestErofsXattrSpillingTablecovering all rows from the issue description table.- Added
TestErofsXattr16KiBValueverifying 16 KiB xattr values round-trip through snapshots.- Added
TestErofsSharedXattrDeduplicationverifying multi-inode deduplication in the shared area.- Added
TestErofsRootRegistryMultiKilobyteXattrverifying multi-kilobyte registry xattrs on the root inode.- Added
TestErofsPerInodeBudgetEnforcementtesting upfront budget rejection.- Validated against external
fsck.erofsutility when available.