[PATCH 19/26] configure: don't check for preadv and pwritev

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

 



preadv and pwritev have been supported since Linux 2.6.30.

Signed-off-by: Christoph Hellwig <hch@xxxxxx>
Reviewed-by: Darrick J. Wong <djwong@xxxxxxxxxx>
---
 configure.ac          |  1 -
 include/builddefs.in  |  1 -
 io/Makefile           |  5 -----
 io/pread.c            |  8 --------
 io/pwrite.c           |  8 --------
 m4/package_libcdev.m4 | 19 -------------------
 6 files changed, 42 deletions(-)

diff --git a/configure.ac b/configure.ac
index 4d4ce9051..66feba8f7 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 cb63751fd..0e0f26144 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 acef8957d..a81a75fc8 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 0f1d8b97b..75b4390a8 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 467bfa9f8..56171a696 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 37d11e338..7d7679fa0 100644
--- a/m4/package_libcdev.m4
+++ b/m4/package_libcdev.m4
@@ -1,22 +1,3 @@
-#
-# 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)
 #
-- 
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