{
  "slug": "copy-file-range",
  "term": "copy_file_range",
  "aliases": [],
  "definition": "copy_file_range is a Linux system call that copies a requested file range in the kernel and reports the number of bytes actually copied.",
  "note": "A successful call may copy fewer bytes than requested, and zero can indicate EOF. Implementations may accelerate copying with reflinks or server-side copy; success alone does not identify physical allocation. Sparse holes can expand. [linux-cfr]",
  "status": "shipping",
  "advantages": [],
  "limitations": [],
  "related": [
    "reflink",
    "sparse-file"
  ],
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "citations": [
    {
      "id": "linux-cfr",
      "title": "Linux man-pages 6.19: copy_file_range(2), return values and notes",
      "url": "https://man7.org/linux/man-pages/man2/copy_file_range.2.html",
      "accessed": "2026-10-15"
    },
    {
      "id": "hesela-clones",
      "title": "Hesela: Fast file clones and deferred copying costs",
      "url": "https://hesela.com/analyses/file-clones-deferred-copy-cost/",
      "accessed": "2026-10-15"
    }
  ],
  "updated": "2026-10-15"
}
