]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
configure: don't check for fallocate
authorChristoph Hellwig <hch@lst.de>
Thu, 15 Feb 2024 06:54:15 +0000 (07:54 +0100)
committerCarlos Maiolino <cem@kernel.org>
Wed, 13 Mar 2024 07:48:37 +0000 (08:48 +0100)
fallocate has been supported since Linux 2.6.23 and glibc 2.10.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
configure.ac
include/builddefs.in
include/linux.h
io/Makefile
io/prealloc.c
m4/package_libcdev.m4

index 79fb475f7fb4fb7f0cadd001b42a2931b3280fe8..b915733bf66314bc6b9bca0c20296dd6cfdb29de 100644 (file)
@@ -162,7 +162,6 @@ AC_PACKAGE_NEED_PTHREADMUTEXINIT
 AC_PACKAGE_NEED_URCU_H
 AC_PACKAGE_NEED_RCU_INIT
 
-AC_HAVE_FALLOCATE
 AC_HAVE_PWRITEV2
 AC_HAVE_PREADV
 AC_HAVE_COPY_FILE_RANGE
index 5ee969afae40bdde6a5bb7ca96fd4d1f009f923d..be6861e0cf59fd37081206778b32468bd23e884f 100644 (file)
@@ -90,7 +90,6 @@ ENABLE_SCRUB  = @enable_scrub@
 
 HAVE_ZIPPED_MANPAGES = @have_zipped_manpages@
 
-HAVE_FALLOCATE = @have_fallocate@
 HAVE_PREADV = @have_preadv@
 HAVE_PWRITEV2 = @have_pwritev2@
 HAVE_COPY_FILE_RANGE = @have_copy_file_range@
@@ -144,9 +143,6 @@ endif
 ifeq ($(HAVE_GETFSMAP),yes)
 PCFLAGS+= -DHAVE_GETFSMAP
 endif
-ifeq ($(HAVE_FALLOCATE),yes)
-PCFLAGS += -DHAVE_FALLOCATE
-endif
 
 LIBICU_LIBS = @libicu_LIBS@
 LIBICU_CFLAGS = @libicu_CFLAGS@
index eddc4ad9c899ba1b35d0c718039bad4be2dd060e..95a0deee25945cf00a6339964e438acd04f4a481 100644 (file)
@@ -27,9 +27,7 @@
 #include <asm/types.h>
 #include <mntent.h>
 #include <fcntl.h>
-#if defined(HAVE_FALLOCATE)
 #include <linux/falloc.h>
-#endif
 #ifdef OVERRIDE_SYSTEM_FSXATTR
 # define fsxattr sys_fsxattr
 #endif
index 837716238e8a8cf8169fa6261fc549ccac9f6913..eb6ad05745eae243486063a88887aaf1b1603167 100644 (file)
@@ -33,10 +33,6 @@ ifeq ($(ENABLE_EDITLINE),yes)
 LLDLIBS += $(LIBEDITLINE) $(LIBTERMCAP)
 endif
 
-ifeq ($(HAVE_FALLOCATE),yes)
-LCFLAGS += -DHAVE_FALLOCATE
-endif
-
 # Also implies PWRITEV
 ifeq ($(HAVE_PREADV),yes)
 LCFLAGS += -DHAVE_PREADV -DHAVE_PWRITEV
index 5805897a4a0a26156b0c3fddf73fe981f93d377d..8e968c9f2455d542500da7117aca514297df13c7 100644 (file)
@@ -4,9 +4,7 @@
  * All Rights Reserved.
  */
 
-#if defined(HAVE_FALLOCATE)
 #include <linux/falloc.h>
-#endif
 #include "command.h"
 #include "input.h"
 #include "init.h"
@@ -37,14 +35,12 @@ static cmdinfo_t freesp_cmd;
 static cmdinfo_t resvsp_cmd;
 static cmdinfo_t unresvsp_cmd;
 static cmdinfo_t zero_cmd;
-#if defined(HAVE_FALLOCATE)
 static cmdinfo_t falloc_cmd;
 static cmdinfo_t fpunch_cmd;
 static cmdinfo_t fcollapse_cmd;
 static cmdinfo_t finsert_cmd;
 static cmdinfo_t fzero_cmd;
 static cmdinfo_t funshare_cmd;
-#endif
 
 static int
 offset_length(
@@ -182,7 +178,6 @@ zero_f(
 }
 
 
-#if defined (HAVE_FALLOCATE)
 static void
 falloc_help(void)
 {
@@ -381,7 +376,6 @@ funshare_f(
        }
        return 0;
 }
-#endif /* HAVE_FALLOCATE */
 
 void
 prealloc_init(void)
@@ -435,7 +429,6 @@ prealloc_init(void)
        add_command(&unresvsp_cmd);
        add_command(&zero_cmd);
 
-#if defined (HAVE_FALLOCATE)
        falloc_cmd.name = "falloc";
        falloc_cmd.cfunc = fallocate_f;
        falloc_cmd.argmin = 2;
@@ -496,5 +489,4 @@ prealloc_init(void)
        funshare_cmd.oneline =
        _("unshares shared blocks within the range");
        add_command(&funshare_cmd);
-#endif /* HAVE_FALLOCATE */
 }
index 17319bb2310010f9c072a6cc0e0f09e900a34d6f..758b9378cd60ec7dc8b4bbec2dcd9f80c757a100 100644 (file)
@@ -1,22 +1,3 @@
-#
-# Check if we have a fallocate libc call (Linux)
-#
-AC_DEFUN([AC_HAVE_FALLOCATE],
-  [ AC_MSG_CHECKING([for fallocate])
-    AC_LINK_IFELSE(
-    [  AC_LANG_PROGRAM([[
-#define _GNU_SOURCE
-#include <fcntl.h>
-#include <linux/falloc.h>
-       ]], [[
-fallocate(0, 0, 0, 0);
-       ]])
-    ], have_fallocate=yes
-       AC_MSG_RESULT(yes),
-       AC_MSG_RESULT(no))
-    AC_SUBST(have_fallocate)
-  ])
-
 #
 # Check if we have a preadv libc call (Linux)
 #