Skip to content

vfs: return EOPNOTSUPP for FICLONE/FICLONERANGE/FIDEDUPERANGE#12862

Merged
copybara-service[bot] merged 2 commits intomasterfrom
test/cl893757418
Apr 3, 2026
Merged

vfs: return EOPNOTSUPP for FICLONE/FICLONERANGE/FIDEDUPERANGE#12862
copybara-service[bot] merged 2 commits intomasterfrom
test/cl893757418

Conversation

@copybara-service
Copy link
Copy Markdown

vfs: return EOPNOTSUPP for FICLONE/FICLONERANGE/FIDEDUPERANGE

Linux returns EOPNOTSUPP when a filesystem does not support reflink. gVisor returned ENOTTY, breaking programs like syncthing that rely on EOPNOTSUPP to gracefully fall back to regular copy.

Handle these ioctls in FileDescriptionDefaultImpl.Ioctl() so all filesystems without custom Ioctl get the correct errno automatically.

FUTURE_COPYBARA_INTEGRATE_REVIEW=#12853 from tanyifeng:vfs-ficlone-eopnotsupp 7435a6c

Linux returns EOPNOTSUPP when a filesystem does not support reflink.
gVisor returned ENOTTY, breaking programs like syncthing that rely
on EOPNOTSUPP to gracefully fall back to regular copy.

Handle these ioctls in FileDescriptionDefaultImpl.Ioctl() so all
filesystems without custom Ioctl get the correct errno automatically.

Signed-off-by: Tan Yifeng <yiftan@tencent.com>
@copybara-service copybara-service bot added the exported Issue was exported automatically label Apr 2, 2026
@copybara-service copybara-service bot merged commit b03a9f5 into master Apr 3, 2026
@copybara-service copybara-service bot deleted the test/cl893757418 branch April 3, 2026 00:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

exported Issue was exported automatically

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants