On Sat, Mar 20, 2021 at 10:27:27AM +0100, pierre.labas...@neuf.fr wrote: > Note that I doubt this check is needed in configure: > HAVE_OWN_FIEMAP_EXTENT_DEFINE is used only once in cmds/filesystem-du.c > in: > #if !defined(FIEMAP_EXTENT_SHARED) && (HAVE_OWN_FIEMAP_EXTENT_SHARED_DEFINE > == 1) > but HAVE_OWN_FIEMAP_EXTENT_SHARED_DEFINE is set to 1 by configure only if > FIEMAP_EXTENT_SHARED is not defined in the kernel headers. > > If you agree, I'll send a patch to completely remove this check.
The explanation why we want the configure-time check is in https://github.com/kdave/btrfs-progs/commit/cf8fd1a70884db0b31e312d07806 ie. to support old distros. There's a runtime check for version in case the fiemap flag is not supported in cmd_filesystem_du.