RFC: should a copy_file_range(2) syscall work across multiple file systems?
asomers at freebsd.org
Thu Jun 20 02:08:14 UTC 2019
On Wed, Jun 19, 2019 at 5:56 PM Rick Macklem <rmacklem at uoguelph.ca> wrote:
> I have been working on a copy_file_range(2) syscall for FreeBSD, which is meant
> to be compatible with the Linux one. (Current patch is at
> One thing the current patch does do is allow the kernel copy to be done across
> multiple file systems (ie. source and destination files on different file systems).
> The Linux syscall *may* not allow this. The man page specifies EXDEV as an
> error return, but discussion of the Linux syscall suggests that it may be (or has
> already been) modified to work across multiple file systems.
> I thought that this would be a useful feature, but does require the default
> code to be above the VOP_xxx() layer and *might* not be Linux compatible.
> (The incompatibility would be working for cases where the Linux syscall might not.)
> So, should it work across multiple file systems?
I don't think there's anything wrong with it. Do it.
More information about the freebsd-fs