Skip to content

feat: Add fs::ioctl_ficlonerange for FICLONERANGE#1624

Open
pauldoo wants to merge 1 commit into
bytecodealliance:mainfrom
pauldoo:ficlonerange
Open

feat: Add fs::ioctl_ficlonerange for FICLONERANGE#1624
pauldoo wants to merge 1 commit into
bytecodealliance:mainfrom
pauldoo:ficlonerange

Conversation

@pauldoo
Copy link
Copy Markdown

@pauldoo pauldoo commented May 13, 2026

Alongside fs::ioctl_ficlone for FICLONE, add support for the FICLONERANGE operation.

I have tested this on a local btrfs filesystem and I believe XFS with reflinks should support this too.

The existing ioctl_ficlone claimed that SPARC is not supported. I don't have a SPARC system to test on, but I'm assuming that if whole file cloning (reflinking) isn't supported on SPARC, then neither too would range cloning.

Alongside `fs::ioctl_ficlone` for FICLONE, add support for
the FICLONERANGE operation.
@pauldoo
Copy link
Copy Markdown
Author

pauldoo commented May 14, 2026

I believe the test failures are unrelated to my changes. They are being tracked here: #1607

@pauldoo
Copy link
Copy Markdown
Author

pauldoo commented May 14, 2026

It seems to be rustix convention that all these functions are marked #[inline]. So I have used it too on this ioctl_ficlonerange function.

But it's it's not clear to me why this is done....

I doubt it's for performance reasons. All of these functions are wrappers to system calls, and the cost of any system call will dwarf the saving from inlining. I'd like to hear the opinion of rustix maintainers on this.

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.

1 participant