aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2024-02-15 07:54:16 +0100
committerCarlos Maiolino <cem@kernel.org>2024-03-13 08:48:37 +0100
commitbafafcb962833b92607558a2b882d41b487a83f7 (patch)
tree1a333ca6b226c68c3bfe07cce51b5a8ea2d3b9e4
parent15fb447f8fa166ca6e4148c26c51c6601363417f (diff)
downloadxfsprogs-dev-bafafcb962833b92607558a2b882d41b487a83f7.tar.gz
configure: don't check for syncfs
syncfs has been supported since Linux 2.6.39. 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.ac1
-rw-r--r--include/builddefs.in1
-rw-r--r--io/Makefile4
-rw-r--r--io/sync.c4
-rw-r--r--m4/package_libcdev.m418
-rw-r--r--scrub/Makefile4
-rw-r--r--scrub/common.h8
7 files changed, 0 insertions, 40 deletions
diff --git a/configure.ac b/configure.ac
index b915733bf6..4d4ce90511 100644
--- a/configure.ac
+++ b/configure.ac
@@ -165,7 +165,6 @@ AC_PACKAGE_NEED_RCU_INIT
AC_HAVE_PWRITEV2
AC_HAVE_PREADV
AC_HAVE_COPY_FILE_RANGE
-AC_HAVE_SYNCFS
AC_HAVE_FSETXATTR
AC_HAVE_MREMAP
AC_NEED_INTERNAL_FSXATTR
diff --git a/include/builddefs.in b/include/builddefs.in
index be6861e0cf..b516ba9e1c 100644
--- a/include/builddefs.in
+++ b/include/builddefs.in
@@ -93,7 +93,6 @@ HAVE_ZIPPED_MANPAGES = @have_zipped_manpages@
HAVE_PREADV = @have_preadv@
HAVE_PWRITEV2 = @have_pwritev2@
HAVE_COPY_FILE_RANGE = @have_copy_file_range@
-HAVE_SYNCFS = @have_syncfs@
HAVE_FSETXATTR = @have_fsetxattr@
HAVE_MREMAP = @have_mremap@
NEED_INTERNAL_FSXATTR = @need_internal_fsxattr@
diff --git a/io/Makefile b/io/Makefile
index eb6ad05745..acef8957d6 100644
--- a/io/Makefile
+++ b/io/Makefile
@@ -25,10 +25,6 @@ CFILES += copy_file_range.c
LCFLAGS += -DHAVE_COPY_FILE_RANGE
endif
-ifeq ($(HAVE_SYNCFS),yes)
-LCFLAGS += -DHAVE_SYNCFS
-endif
-
ifeq ($(ENABLE_EDITLINE),yes)
LLDLIBS += $(LIBEDITLINE) $(LIBTERMCAP)
endif
diff --git a/io/sync.c b/io/sync.c
index 89f787ecd7..f3b900d86f 100644
--- a/io/sync.c
+++ b/io/sync.c
@@ -21,7 +21,6 @@ sync_f(
return 0;
}
-#ifdef HAVE_SYNCFS
static cmdinfo_t syncfs_cmd;
static int
@@ -35,7 +34,6 @@ syncfs_f(
}
return 0;
}
-#endif
void
sync_init(void)
@@ -49,7 +47,6 @@ sync_init(void)
add_command(&sync_cmd);
-#ifdef HAVE_SYNCFS
syncfs_cmd.name = "syncfs";
syncfs_cmd.cfunc = syncfs_f;
syncfs_cmd.flags = CMD_NOMAP_OK | CMD_FOREIGN_OK;
@@ -57,5 +54,4 @@ sync_init(void)
_("calls syncfs(2) to flush all in-core filesystem state to disk");
add_command(&syncfs_cmd);
-#endif
}
diff --git a/m4/package_libcdev.m4 b/m4/package_libcdev.m4
index 758b9378cd..37d11e3381 100644
--- a/m4/package_libcdev.m4
+++ b/m4/package_libcdev.m4
@@ -55,24 +55,6 @@ syscall(__NR_copy_file_range, 0, 0, 0, 0, 0, 0);
])
#
-# Check if we have a syncfs libc call (Linux)
-#
-AC_DEFUN([AC_HAVE_SYNCFS],
- [ AC_MSG_CHECKING([for syncfs])
- AC_LINK_IFELSE(
- [ AC_LANG_PROGRAM([[
-#define _GNU_SOURCE
-#include <unistd.h>
- ]], [[
-syncfs(0);
- ]])
- ], have_syncfs=yes
- AC_MSG_RESULT(yes),
- AC_MSG_RESULT(no))
- AC_SUBST(have_syncfs)
- ])
-
-#
# Check if we have a fsetxattr call
#
AC_DEFUN([AC_HAVE_FSETXATTR],
diff --git a/scrub/Makefile b/scrub/Makefile
index 4368897f2c..f3e22a9d62 100644
--- a/scrub/Makefile
+++ b/scrub/Makefile
@@ -89,10 +89,6 @@ ifeq ($(HAVE_MALLINFO2),yes)
LCFLAGS += -DHAVE_MALLINFO2
endif
-ifeq ($(HAVE_SYNCFS),yes)
-LCFLAGS += -DHAVE_SYNCFS
-endif
-
ifeq ($(HAVE_LIBATTR),yes)
LCFLAGS += -DHAVE_LIBATTR
endif
diff --git a/scrub/common.h b/scrub/common.h
index 865c1caa44..764639c06e 100644
--- a/scrub/common.h
+++ b/scrub/common.h
@@ -74,14 +74,6 @@ double auto_units(unsigned long long number, char **units, int *precision);
unsigned int scrub_nproc(struct scrub_ctx *ctx);
unsigned int scrub_nproc_workqueue(struct scrub_ctx *ctx);
-#ifndef HAVE_SYNCFS
-static inline int syncfs(int fd)
-{
- sync();
- return 0;
-}
-#endif
-
void background_sleep(void);
char *string_escape(const char *in);