Subject: bug#79139: cp --reflink truncates sparse files on ZFS

From: Bruno Haible <[email-masked]>
Date: Sat, 02 Aug 2025 06:15:37 +0200

Paul Eggert wrote:
> +#   if defined __GLIBC__ && ! (2 < __GLIBC__ + (43 <= __GLIBC_MINOR__))

This line is mis-indented.

> +      /* Work around glibc bug 33245

It would be good to document the workaround in
doc/glibc-functions/copy_file_range.texi.

Collin Funk wrote:
> Can't we make this condition only occur for glibc 2.41 and glibc 2.42?
> The issue shouldn't occur before commit
> 89b53077d2a58f00e7debdfe58afabe953dac60d in glibc (2024-06-25).

Users are supposed to be able to create binaries with an older version of
glibc, then upgrade their glibc. The binaries should continue to work.

Bruno