RFC: should copy_file_range(2) remain Linux compatible or support special files?

Wall, Stephen stephen.wall at redcom.com
Sun Sep 27 14:34:00 UTC 2020


> Userspace RAID-like applications could use it for rebuilds, and they'll
> need it to work on device nodes.  Userspace NFS servers and iSCSI servers
> could obviously use it.  And since the FUSE protocol includes a
> COPY_FILE_RANGE operation, many FUSE daemons could implement that with
> copy_file_range(2).

These will need to have conditional code for Linux and FreeBSD anyways, if copy_file_range() behaves differently, and the developer wants a portable application. It seems to me that unless you get the linux community onboard with making a compatible change on their platform, you'd be better off naming the FreeBSD function something different to avoid confusion for cross platform developers.  Though, unless they are well versed in FreeBSD, they won't use it anyways since they are writing code to work on Linux, and that code will also work on FreeBSD, given copy_file_range() compatibility.

Just my opinion, don't feel bad about ignoring it.

-spw


More information about the freebsd-hackers mailing list