diff options
author | Christoph Hellwig <hch@lst.de> | 2024-02-15 07:54:15 +0100 |
---|---|---|
committer | Carlos Maiolino <cem@kernel.org> | 2024-03-13 08:48:37 +0100 |
commit | 15fb447f8fa166ca6e4148c26c51c6601363417f (patch) | |
tree | 70bc28d8249b74f38b9e55646edfc070581d71d5 | |
parent | 055629e0038c28e9ba0bf11a4e59733c040f95e6 (diff) | |
download | xfsprogs-dev-15fb447f8fa166ca6e4148c26c51c6601363417f.tar.gz |
configure: don't check for fallocate
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>
-rw-r--r-- | configure.ac | 1 | ||||
-rw-r--r-- | include/builddefs.in | 4 | ||||
-rw-r--r-- | include/linux.h | 2 | ||||
-rw-r--r-- | io/Makefile | 4 | ||||
-rw-r--r-- | io/prealloc.c | 8 | ||||
-rw-r--r-- | m4/package_libcdev.m4 | 19 |
6 files changed, 0 insertions, 38 deletions
diff --git a/configure.ac b/configure.ac index 79fb475f7f..b915733bf6 100644 --- a/configure.ac +++ b/configure.ac @@ -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 diff --git a/include/builddefs.in b/include/builddefs.in index 5ee969afae..be6861e0cf 100644 --- a/include/builddefs.in +++ b/include/builddefs.in @@ -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@ diff --git a/include/linux.h b/include/linux.h index eddc4ad9c8..95a0deee25 100644 --- a/include/linux.h +++ b/include/linux.h @@ -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 diff --git a/io/Makefile b/io/Makefile index 837716238e..eb6ad05745 100644 --- a/io/Makefile +++ b/io/Makefile @@ -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 diff --git a/io/prealloc.c b/io/prealloc.c index 5805897a4a..8e968c9f24 100644 --- a/io/prealloc.c +++ b/io/prealloc.c @@ -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 */ } diff --git a/m4/package_libcdev.m4 b/m4/package_libcdev.m4 index 17319bb231..758b9378cd 100644 --- a/m4/package_libcdev.m4 +++ b/m4/package_libcdev.m4 @@ -1,23 +1,4 @@ # -# 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) # AC_DEFUN([AC_HAVE_PREADV], |