fs: fall back to plain copy when copy_file_range returns EINVAL #346
All Vouch review confidence checks passed
Residual risk 0.20 = Change Risk (0.37) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.37 · 120 lines diff across 1 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 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
Shallow Review Depth
shallow_review_depth
0.344
Diff Size
diff_size
0.287
Ai Authored
ai_authored
0.050
Real PR Conversation Timeline
1 comments
"Review active on #346"
general
weight: 0.35
dmcgowan
copyFileinfs/copy_linux.goalready falls back to a plain copy whencopy_file_rangefails withEXDEV,ENOSYSorEOPNOTSUPP. This addsEINVALto that list. Filesystems that do not implementcopy_file_rangeat all, such as eCryptfs, can returnEINVALinstead, andCopyFilethen fails withcopy_file_range failed: invalid argumentalthough a plain copy works.The commit message has the details, including why
EINVALcannot hide a real error on this path.Related: #176 (the same on ZFS).
Tested:
go build ./fs/andgo vet ./fs/for linux on this single-commit revision. An earlier revision of this branch, with the same one-line change plus a unit test, passedgo test ./fs/...in agolang:1.24Linux container. Not tested on a real eCryptfs, and not run on macOS or Windows (the changed code is Linux-only).AI disclosure: the patch was written with Claude Code.
🤖 Generated with Claude Code