Re: What is needed for ZFS block cloning to work?
Rick Macklem <[email protected]> Sun, 12 Jul 2026 17:36:14 -0700
| Newsgroups | gmane.os.freebsd.devel.file-systems |
|---|---|
| Message-ID | <CAM5tNy7rVQHndTZjqQkEO+=m1tKCW7FEmecHbUeZYuvwM+_0dA@mail.gmail.com> |
On Sun, Jul 12, 2026 at 5:22=E2=80=AFPM Rob Norris <[email protected]> w= rote: > > 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-w= ork the FICLONERANGE tests to use it. It went into FreeBSD's main on Aug. 9, 2025. But there is no change to the ZFS code. It just makes vn_generic_copy_file_range() fail, since that is th= e fallback. If zfs_copy_file_range() learns how to do a non-block-cloning "co= py", then this will need to change. rick > > Rob.