fideduperange · shipping · also file range deduplication ioctl

FIDEDUPERANGE

FIDEDUPERANGE is a Linux ioctl that compares file ranges and shares their storage when they match.

Related Observatory article: Read on hesela.com

Unlike cloning, this operation preserves different destination bytes instead of replacing them with source contents. If even one byte differs, that destination is reported as FILE_DEDUPE_RANGE_DIFFERS. It works within one mounted filesystem, otherwise EXDEV results, and reports status separately for each destination. The argument structure with all destinations must fit within the system page size. The interface dates from Linux 4.5. [1]

The maximum source length is filesystem dependent, typically 16 MiB, and is enforced silently. [1] The Linux v6.18 VFS path also caps a single request at 1 GiB. [2] In Linux 7.3, Btrfs processes longer ranges in 16 MiB chunks. [5]

A successful outer call can contain failed or mismatched destinations. In the Linux v6.18 VFS path, a nonnegative callback result is reported using the capped request length, even if generic preparation shortened it. That historical counter is not a byte-accurate coverage certificate or a measurement of reclaimed storage. [2]

The Linux v6.12 ioctl wrapper performs work before copying the results back to userspace. Failure of that copy can return EFAULT after work occurred, so an error is not a general rollback guarantee. [3]

Relations

related
Reflink, Data deduplication, Copy-on-write (storage), File extent, Btrfs filesystem du, copy_file_range

Advantages

  • Deduplication is atomic with regard to concurrent writes, so no locks are needed to obtain a consistent shared copy. [1]

Limitations

  • Disk filesystems generally require block-aligned offsets and lengths, and Btrfs and XFS reject overlapping ranges within one file. [1]

Citations

  1. Linux man-pages 6.19: FIDEDUPERANGE, compare-and-share and per-destination results (accessed 2026-10-23)
  2. Linux v6.18: remap_range.c, 1 GiB cap, length rounding and bytes_deduped reporting (accessed 2026-10-23)
  3. Linux v6.12: ioctl.c, FIDEDUPERANGE validation and copying results to userspace (accessed 2026-10-23)

Further reading

  1. Hesela: file cloning and deduplication result accounting (accessed 2026-10-20)
Sources & caveats
  • Implementation details refer to the cited upstream tags, not every downstream kernel or the newest release.
  • The companion worksheet is source-derived arithmetic, not measured filesystem behavior.
  • fidedupe is the Linux man-pages 6.19 FIDEDUPERANGE page, re-read for structures, length limits, errors and history.
  • dedupe-vfs and dedupe-ioctl were re-read at the v6.18 and v6.12 tags for the 1 GiB cap, length rounding and the result copy.
  • btrfs-reflink is fs/btrfs/reflink.c at the v7.3 tag, read for BTRFS_MAX_DEDUPE_LEN.
  • The copy-on-abundant-write entry links here because deduplicated ranges become shared extents whose later unsharing that policy defers.

JSON: /data/terms/fideduperange.json

Published by Hesela team · Updated

Report a correction · Editorial standards · Reuse guidance

Cite this page
Hesela team. FIDEDUPERANGE. Hesela. 2026-10-23. https://hesela.dev/terms/fideduperange/