Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Implement reflink_block for lunix #93

Merged
merged 12 commits into from
Jan 18, 2025
Merged

Conversation

Vaiz
Copy link

@Vaiz Vaiz commented Jan 18, 2025

This PR implements reflink_block for Linux using FICLONERANGE from the libc crate. libc does not provide this functionality for Android, so it's Linux only - https://docs.rs/libc/latest/src/libc/unix/linux_like/linux/arch/generic/mod.rs.html#119

This code has been tested on Ubuntu x86_64 with the Btrfs filesystem.

Copy link
Member

@NobodyXu NobodyXu left a comment

Choose a reason for hiding this comment

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

Thank you so much!

Just two suggestions on the example

@Vaiz Vaiz requested a review from NobodyXu January 18, 2025 15:11
Copy link
Member

@NobodyXu NobodyXu left a comment

Choose a reason for hiding this comment

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

Thank you!

@NobodyXu NobodyXu merged commit 497845a into cargo-bins:main Jan 18, 2025
18 checks passed
@github-actions github-actions bot mentioned this pull request Jan 18, 2025
@Vaiz Vaiz deleted the reflink_block_unix branch January 19, 2025 10:54
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants