Re: What is needed for ZFS block cloning to work?

"Rob Norris" <[email protected]> Mon, 13 Jul 2026 10:21:50 +1000
Newsgroups gmane.os.freebsd.devel.file-systems
Message-ID <[email protected]>
--b9006c54787002b291430bd64068c9352c83b63f
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

On Mon, 13 Jul 2026, at 10:18 AM, Rick Macklem wrote:
> For FreeBSD, if cloning or failure of the copy_file_range(2) syscall is
> desired, the flag argument COPY_FILE_RANGE_CLONE can be specified.
> (to avoid the fallback to the copy loop in the kernel syscall)

Oh, interesting! That wasn't there when we first wired it up (pretty sure). I'll check if that's working properly against ZFS. At minimum, I'll re-work the FICLONERANGE tests to use it.

Rob.
--b9006c54787002b291430bd64068c9352c83b63f
Content-Type: text/html
Content-Transfer-Encoding: 7bit

<!DOCTYPE html><html><head><title></title></head><body><div>On Mon, 13 Jul 2026, at 10:18 AM, Rick Macklem wrote:</div><blockquote type="cite" id="qt" style=""><div>For FreeBSD, if cloning or failure of the copy_file_range(2) syscall is</div><div>desired, the flag argument COPY_FILE_RANGE_CLONE can be specified.</div><div>(to avoid the fallback to the copy loop in the kernel syscall)</div></blockquote><div><br></div><div>Oh, interesting! That wasn't there when we first wired it up (pretty sure). I'll check if that's working properly against ZFS. At minimum, I'll re-work the FICLONERANGE tests to use it.</div><div><br></div><div>Rob.</div></body></html>
--b9006c54787002b291430bd64068c9352c83b63f--