aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2024-02-15 07:54:17 +0100
committerCarlos Maiolino <cem@kernel.org>2024-03-13 08:48:37 +0100
commit636f77efe54e33723740828815538b4f8b8cadde (patch)
tree71ce974cbbfec4a49964b80ac5725941c6774e5b
parentbafafcb962833b92607558a2b882d41b487a83f7 (diff)
downloadxfsprogs-dev-636f77efe54e33723740828815538b4f8b8cadde.tar.gz
configure: don't check for preadv and pwritev
preadv and pwritev have been supported since Linux 2.6.30. 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/Makefile5
-rw-r--r--io/pread.c8
-rw-r--r--io/pwrite.c8
-rw-r--r--m4/package_libcdev.m419
6 files changed, 0 insertions, 42 deletions
diff --git a/configure.ac b/configure.ac
index 4d4ce90511..66feba8f7a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -163,7 +163,6 @@ AC_PACKAGE_NEED_URCU_H
AC_PACKAGE_NEED_RCU_INIT
AC_HAVE_PWRITEV2
-AC_HAVE_PREADV
AC_HAVE_COPY_FILE_RANGE
AC_HAVE_FSETXATTR
AC_HAVE_MREMAP
diff --git a/include/builddefs.in b/include/builddefs.in
index b516ba9e1c..f0c59b3985 100644
--- a/include/builddefs.in
+++ b/include/builddefs.in
@@ -90,7 +90,6 @@ ENABLE_SCRUB = @enable_scrub@
HAVE_ZIPPED_MANPAGES = @have_zipped_manpages@
-HAVE_PREADV = @have_preadv@
HAVE_PWRITEV2 = @have_pwritev2@
HAVE_COPY_FILE_RANGE = @have_copy_file_range@
HAVE_FSETXATTR = @have_fsetxattr@
diff --git a/io/Makefile b/io/Makefile
index acef8957d6..a81a75fc87 100644
--- a/io/Makefile
+++ b/io/Makefile
@@ -29,11 +29,6 @@ ifeq ($(ENABLE_EDITLINE),yes)
LLDLIBS += $(LIBEDITLINE) $(LIBTERMCAP)
endif
-# Also implies PWRITEV
-ifeq ($(HAVE_PREADV),yes)
-LCFLAGS += -DHAVE_PREADV -DHAVE_PWRITEV
-endif
-
ifeq ($(HAVE_PWRITEV2),yes)
LCFLAGS += -DHAVE_PWRITEV2
endif
diff --git a/io/pread.c b/io/pread.c
index 79990c6a97..62c771fb8e 100644
--- a/io/pread.c
+++ b/io/pread.c
@@ -37,9 +37,7 @@ pread_help(void)
" -R -- read at random offsets in the range of bytes\n"
" -Z N -- zeed the random number generator (used when reading randomly)\n"
" (heh, zorry, the -s/-S arguments were already in use in pwrite)\n"
-#ifdef HAVE_PREADV
" -V N -- use vectored IO with N iovecs of blocksize each (preadv)\n"
-#endif
"\n"
" When in \"random\" mode, the number of read operations will equal the\n"
" number required to do a complete forward/backward scan of the range.\n"
@@ -160,7 +158,6 @@ dump_buffer(
}
}
-#ifdef HAVE_PREADV
static ssize_t
do_preadv(
int fd,
@@ -192,9 +189,6 @@ do_preadv(
return bytes;
}
-#else
-#define do_preadv(fd, offset, count) (0)
-#endif
static ssize_t
do_pread(
@@ -414,7 +408,6 @@ pread_f(
case 'v':
vflag = 1;
break;
-#ifdef HAVE_PREADV
case 'V':
vectors = strtoul(optarg, &sp, 0);
if (!sp || sp == optarg) {
@@ -424,7 +417,6 @@ pread_f(
return 0;
}
break;
-#endif
case 'Z':
zeed = strtoul(optarg, &sp, 0);
if (!sp || sp == optarg) {
diff --git a/io/pwrite.c b/io/pwrite.c
index 8d134c562b..a88cecc7ea 100644
--- a/io/pwrite.c
+++ b/io/pwrite.c
@@ -40,9 +40,7 @@ pwrite_help(void)
" -R -- write at random offsets in the specified range of bytes\n"
" -Z N -- zeed the random number generator (used when writing randomly)\n"
" (heh, zorry, the -s/-S arguments were already in use in pwrite)\n"
-#ifdef HAVE_PWRITEV
" -V N -- use vectored IO with N iovecs of blocksize each (pwritev)\n"
-#endif
#ifdef HAVE_PWRITEV2
" -N -- Perform the pwritev2() with RWF_NOWAIT\n"
" -D -- Perform the pwritev2() with RWF_DSYNC\n"
@@ -50,7 +48,6 @@ pwrite_help(void)
"\n"));
}
-#ifdef HAVE_PWRITEV
static ssize_t
do_pwritev(
int fd,
@@ -90,9 +87,6 @@ do_pwritev(
return bytes;
}
-#else
-#define do_pwritev(fd, offset, count, pwritev2_flags) (0)
-#endif
static ssize_t
do_pwrite(
@@ -353,7 +347,6 @@ pwrite_f(
case 'u':
uflag = 1;
break;
-#ifdef HAVE_PWRITEV
case 'V':
vectors = strtoul(optarg, &sp, 0);
if (!sp || sp == optarg) {
@@ -363,7 +356,6 @@ pwrite_f(
return 0;
}
break;
-#endif
case 'w':
wflag = 1;
break;
diff --git a/m4/package_libcdev.m4 b/m4/package_libcdev.m4
index 37d11e3381..7d7679fa09 100644
--- a/m4/package_libcdev.m4
+++ b/m4/package_libcdev.m4
@@ -1,23 +1,4 @@
#
-# Check if we have a preadv libc call (Linux)
-#
-AC_DEFUN([AC_HAVE_PREADV],
- [ AC_MSG_CHECKING([for preadv])
- AC_LINK_IFELSE(
- [ AC_LANG_PROGRAM([[
-#define _BSD_SOURCE
-#define _DEFAULT_SOURCE
-#include <sys/uio.h>
- ]], [[
-preadv(0, 0, 0, 0);
- ]])
- ], have_preadv=yes
- AC_MSG_RESULT(yes),
- AC_MSG_RESULT(no))
- AC_SUBST(have_preadv)
- ])
-
-#
# Check if we have a pwritev2 libc call (Linux)
#
AC_DEFUN([AC_HAVE_PWRITEV2],