Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 08 Jun 2024 07:36:45 +0200
From:      =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= <des@FreeBSD.org>
To:        Stefan Esser <se@FreeBSD.org>
Cc:        Yuri Victorovich <yuri@FreeBSD.org>,  freebsd-hackers@freebsd.org
Subject:   Re: What are equivalents of Linux ioctl functions FICLONE and FICLONERANGE ?
Message-ID:  <86o78c2dxu.fsf@ltc.des.dev>
In-Reply-To: <1406f7e7-63a9-4f9a-a2e6-2de71bac65cb@FreeBSD.org> (Stefan Esser's message of "Fri, 7 Jun 2024 11:48:47 %2B0200")
References:  <2bcfb025-b639-4696-82e6-bfeb1a291294@FreeBSD.org> <1406f7e7-63a9-4f9a-a2e6-2de71bac65cb@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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
--=20
Dag-Erling Sm=C3=B8rgrav - des@FreeBSD.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86o78c2dxu.fsf>