RFR: 8293004: (fs) copy_file_range needs fallback handling for ENOSYS

Florian Weimer fweimer at redhat.com
Sat Aug 27 12:45:07 UTC 2022


* Thomas Stüfe:

> do I understand this correctly: by backporting the user-space
> emulation for copy_file_range, glibc 2.27 broke compatibility with
> kernels < 4.5?
>
> If yes, why did glibc not retain the emulation for the ENOSYS case?

The emulation was buggy in corner cases, and the kernel kept changing
behavior, too.  With the current implementation, an application can
decide whether they want to roll their own slightly dodgy copying loop
if there is no kernel support.  With the emulation present, that wasn't
possible.

(Not sure if the <fweimer at openjdk.org> address works.)

Thanks,
Florian



More information about the nio-dev mailing list