On 2025-12-23 15:24, Matteo Croce wrote:
copy_file_range(0, NULL, 1, NULL, 9223372035781033984, 0) = 0
read(0, 0xffff273fc000, 262144)         = -1 EINVAL (Invalid argument)

Yes, the idea is to not trust copy_file_range all that much, and to finish off with a classic read/write loop to make sure things are OK, as we've run into so many squirrelly file systems where copy_file_range doesn't copy everything. Ironically here the classic code runs into the 'read' kernel bug whereas copy_file_range works.

Reply via email to