Re: What are equivalents of Linux ioctl functions FICLONE and FICLONERANGE ?
Date: Sat, 08 Jun 2024 05:36:45 UTC
Stefan Esser <se@FreeBSD.org> writes: > Yuri Victorovich <yuri@FreeBSD.org> writes: > > On Linux files can be copied with: > > ioctl(destFd, FICLONE, srcFd) > > What would be the equivalent of this on FreeBSD? > That would be copy_file_range(), but as on Linux, it does only > offer any benefit on filesystems that support copy-on-write or > potentially on network attached storage. Even without filesystem support, it still avoids copying the contents of the file out to user space, so it's faster than a regular copy. DES -- Dag-Erling Smørgrav - des@FreeBSD.org