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

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
io/Makefile
io/io.h
m4/package_libcdev.m4

index 2650b71113e7cf068829f1bea39a651e076dbf5e..5f1478f688b3e4a3b136ffe10ba3e1b464313000 100644 (file)
@@ -166,7 +166,6 @@ AC_HAVE_FALLOCATE
 AC_HAVE_PWRITEV2
 AC_HAVE_PREADV
 AC_HAVE_COPY_FILE_RANGE
-AC_HAVE_SYNC_FILE_RANGE
 AC_HAVE_SYNCFS
 AC_HAVE_FLS
 AC_HAVE_READDIR
index f303118745d77583c23d3ce90d2cc483f990dd88..9efdf3b6b96d1abb62adadbc710601f66f8bc706 100644 (file)
@@ -94,7 +94,6 @@ HAVE_FALLOCATE = @have_fallocate@
 HAVE_PREADV = @have_preadv@
 HAVE_PWRITEV2 = @have_pwritev2@
 HAVE_COPY_FILE_RANGE = @have_copy_file_range@
-HAVE_SYNC_FILE_RANGE = @have_sync_file_range@
 HAVE_SYNCFS = @have_syncfs@
 HAVE_READDIR = @have_readdir@
 HAVE_FLS = @have_fls@
index 2271389f5335a5f828e83527f593ccc03a01d68e..0709f8f21f415333daf895562721756c005b7edd 100644 (file)
@@ -13,7 +13,8 @@ CFILES = init.c \
        file.c freeze.c fsuuid.c fsync.c getrusage.c imap.c inject.c label.c \
        link.c mmap.c open.c parent.c pread.c prealloc.c pwrite.c reflink.c \
        resblks.c scrub.c seek.c shutdown.c stat.c swapext.c sync.c \
-       truncate.c utimes.c fadvise.c sendfile.c madvise.c mincore.c fiemap.c
+       truncate.c utimes.c fadvise.c sendfile.c madvise.c mincore.c fiemap.c \
+       sync_file_range.c
 
 LLDLIBS = $(LIBXCMD) $(LIBHANDLE) $(LIBFROG) $(LIBPTHREAD) $(LIBUUID)
 LTDEPENDENCIES = $(LIBXCMD) $(LIBHANDLE) $(LIBFROG)
@@ -24,11 +25,6 @@ CFILES += copy_file_range.c
 LCFLAGS += -DHAVE_COPY_FILE_RANGE
 endif
 
-ifeq ($(HAVE_SYNC_FILE_RANGE),yes)
-CFILES += sync_file_range.c
-LCFLAGS += -DHAVE_SYNC_FILE_RANGE
-endif
-
 ifeq ($(HAVE_SYNCFS),yes)
 LCFLAGS += -DHAVE_SYNCFS
 endif
diff --git a/io/io.h b/io/io.h
index e7414aeaa79f323720e889d3c14d8c186c924a82..8e044e522ffb21102cb39f4d35b0db41bdd3d845 100644 (file)
--- a/io/io.h
+++ b/io/io.h
@@ -128,11 +128,7 @@ extern void                copy_range_init(void);
 #define copy_range_init()      do { } while (0)
 #endif
 
-#ifdef HAVE_SYNC_FILE_RANGE
 extern void            sync_range_init(void);
-#else
-#define sync_range_init()      do { } while (0)
-#endif
 
 #ifdef HAVE_READDIR
 extern void            readdir_init(void);
index 93daf3640d06185b6f1e5ebb16c7a0962309e690..5a2290de11d66488e08d7a84e1fb086a5de4cce2 100644 (file)
@@ -73,24 +73,6 @@ syscall(__NR_copy_file_range, 0, 0, 0, 0, 0, 0);
     AC_SUBST(have_copy_file_range)
   ])
 
-#
-# Check if we have a sync_file_range libc call (Linux)
-#
-AC_DEFUN([AC_HAVE_SYNC_FILE_RANGE],
-  [ AC_MSG_CHECKING([for sync_file_range])
-    AC_LINK_IFELSE(
-    [  AC_LANG_PROGRAM([[
-#define _GNU_SOURCE
-#include <fcntl.h>
-       ]], [[
-sync_file_range(0, 0, 0, 0);
-       ]])
-    ], have_sync_file_range=yes
-       AC_MSG_RESULT(yes),
-       AC_MSG_RESULT(no))
-    AC_SUBST(have_sync_file_range)
-  ])
-
 #
 # Check if we have a syncfs libc call (Linux)
 #