Subject: Missing fallback if copy_file_range returns ENOENT?

From: Sam James <[email-masked]>
Date: Sat, 31 Dec 2022 17:00:48 +0000

Hi folks,

Originally reported in Gentoo at https://bugs.gentoo.org/885793.

Frank Limpert reported that when copying large files across CIFS shares,
cp may abort because copy_file_range returns ENOENT sometimes.

This sounds like a suspicious kernel bug if CIFS interactions are sometimes
spuriously giving ENOENT, but I'm wondering if coreutils needs to do
anything to handle this as well.

strace output from his cp invocation: https://bugs.gentoo.org/attachment.cgi?id=842497

Best,
sam