[PATCH 14/27] configure: don't check for sync_file_range

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



sync_file_range has been supported since Linux 2.6.17.

Signed-off-by: Christoph Hellwig <hch@xxxxxx>
---
 configure.ac          |  1 -
 include/builddefs.in  |  1 -
 io/Makefile           |  8 ++------
 io/io.h               |  4 ----
 m4/package_libcdev.m4 | 18 ------------------
 5 files changed, 2 insertions(+), 30 deletions(-)

diff --git a/configure.ac b/configure.ac
index 40999b598..7c1248583 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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
diff --git a/include/builddefs.in b/include/builddefs.in
index a5408014d..247dd9956 100644
--- a/include/builddefs.in
+++ b/include/builddefs.in
@@ -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@
diff --git a/io/Makefile b/io/Makefile
index 2271389f5..0709f8f21 100644
--- a/io/Makefile
+++ b/io/Makefile
@@ -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 982d37c38..ad025c51d 100644
--- 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);
diff --git a/m4/package_libcdev.m4 b/m4/package_libcdev.m4
index 93daf3640..5a2290de1 100644
--- a/m4/package_libcdev.m4
+++ b/m4/package_libcdev.m4
@@ -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)
 #
-- 
2.39.2





[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux