Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Support for FIDEDUPERANGE #11065

Open
luke-jr opened this issue Oct 15, 2020 · 5 comments
Open

Support for FIDEDUPERANGE #11065

luke-jr opened this issue Oct 15, 2020 · 5 comments
Labels
Type: Feature Feature request or new feature

Comments

@luke-jr
Copy link

luke-jr commented Oct 15, 2020

Linux 5.4 added an ioctl to inform filesystems of duplicate data, for deduplication. It would be nice if ZFS supported it.

Use case: a cron job could regularly find data to deduplicate without the memory overhead of current ZFS deduplication.

@luke-jr luke-jr added the Type: Feature Feature request or new feature label Oct 15, 2020
@PrivatePuffin
Copy link
Contributor

Are you sure that said function is compatible with ZFS?
Not part of LVM or something?

@Rydako
Copy link

Rydako commented Oct 17, 2020

https://man7.org/linux/man-pages/man2/ioctl_fideduperange.2.html

"This ioctl operation first appeared in Linux 4.5. It was previously known as BTRFS_IOC_FILE_EXTENT_SAME and was private to Btrfs."

Isn't LVM specific, and is already used by BTRFS it seems.

"Both files must reside within the same filesystem" I'm by no means an expert on the inner workings of ZFS, but wouldn't this caveat mean this could only be used to dedup within a single dataset?

@luke-jr
Copy link
Author

luke-jr commented Oct 17, 2020

Are you sure that said function is compatible with ZFS?

At least in some contexts, it should be? ZFS already deduplicates snapshots, for example.

I'm not familiar with the more generalised existing ZFS deduplication, but I don't know why it wouldn't prove this function is possible.

"Both files must reside within the same filesystem" I'm by no means an expert on the inner workings of ZFS, but wouldn't this caveat mean this could only be used to dedup within a single dataset?

If you add such a limitation, it might be nice to have an option to not enforce it. :)

@shodanshok
Copy link
Contributor

This basically is a rehash of reflink support. A much needed feature, I must say...

@strugee
Copy link
Contributor

strugee commented Oct 5, 2023

Note that this issue is theoretically unblocked since reflink support has landed.

dberlin added a commit to dberlin/zfs that referenced this issue Oct 10, 2023
This resolves issue openzfs#11065 by implementing FIDUPERANGE on Linux.
dberlin added a commit to dberlin/zfs that referenced this issue Oct 10, 2023
This resolves issue openzfs#11065 by implementing FIDUPERANGE on Linux.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature Feature request or new feature
Projects
None yet
Development

No branches or pull requests

5 participants