]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Linux: fix copy_file_range test on Linux >= 6.18
authorXi Ruoyao <xry111@xry111.site>
Thu, 8 Jan 2026 07:27:53 +0000 (15:27 +0800)
committerAndreas K. Hüttel <dilfridge@gentoo.org>
Fri, 9 Jan 2026 11:19:46 +0000 (12:19 +0100)
On Linux >= 6.18, the kernel submits the new COPY_FILE_RANGE_64
operation to the fuse implementation for large files.  There is a
fall-back routine to COPY_FILE_RANGE but it's only used if
COPY_FILE_RANGE_64 returns ENOSYS.

So, return ENOSYS instead of EIO for "unsupported" operations in order
to make the kernel do the correct thing for this case and maybe in case
that a new operation is added into the kernel fuse interface in the
future.

Signed-off-by: Xi Ruoyao <xry111@xry111.site>
Reviewed-by: Florian Weimer <fweimer@redhat.com>
sysdeps/unix/sysv/linux/tst-copy_file_range-large.c

index 8013afb282eedcf9922aeb3aac10f9a4ffd23234..e92f7d45571f5509614e4a0dd2f8fb1b484b2027 100644 (file)
@@ -128,7 +128,7 @@ fuse_thread (struct support_fuse *f, void *closure)
           break;
 
         default:
-          support_fuse_reply_error (f, EIO);
+          support_fuse_reply_error (f, ENOSYS);
         }
     }
 }