]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
build-sys: remove deprecated elvtune command
authorKarel Zak <kzak@redhat.com>
Tue, 13 Aug 2013 13:55:52 +0000 (15:55 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 13 Aug 2013 13:55:52 +0000 (15:55 +0200)
The command is deprecated for years and useless with 2.6.x kernels.

Signed-off-by: Karel Zak <kzak@redhat.com>
configure.ac
disk-utils/Makemodule.am
disk-utils/elvtune.8 [deleted file]
disk-utils/elvtune.c [deleted file]
tests/expected/build-sys/config-all
tests/expected/build-sys/config-all-devel
tests/expected/build-sys/config-all-non-nls
tests/expected/build-sys/config-devel
tests/expected/build-sys/config-devel-new-mount
tests/expected/build-sys/config-devel-non-docs

index 2ad890b5b8acc1ffdde90c908cac719d6e687008..443ad72152dc322f67a22cde0d97754dcbd1ed67 100644 (file)
@@ -667,7 +667,6 @@ AC_ARG_ENABLE([most-builds],
 )
 AS_IF([test "x$enable_most_builds" = xyes], [
   enable_chfn_chsh=yes
-  enable_elvtune=check
   enable_line=yes
   enable_mesg=yes
   enable_newgrp=yes
@@ -1034,15 +1033,6 @@ UL_REQUIRES_SYSCALL_CHECK([pivot_root], [UL_CHECK_SYSCALL([pivot_root])])
 AM_CONDITIONAL([BUILD_PIVOT_ROOT], [test "x$build_pivot_root" = xyes])
 
 
-AC_ARG_ENABLE([elvtune],
-  AS_HELP_STRING([--enable-elvtune], [build elvtune (only works with 2.2 and 2.4 kernels)]),
-  [], [enable_elvtune=no]
-)
-UL_BUILD_INIT([elvtune])
-UL_REQUIRES_LINUX([elvtune])
-AM_CONDITIONAL([BUILD_ELVTUNE], [test "x$build_elvtune" = xyes])
-
-
 AC_ARG_ENABLE([tunelp],
   AS_HELP_STRING([--enable-tunelp], [build tunelp]),
   [], [enable_tunelp=no]
index def18c7f5c02b90eb6e108d246f595e390c94ece..580139234538cd5bed163b7e5f3ef61bc2139c20 100644 (file)
@@ -74,14 +74,6 @@ fsck_CFLAGS = $(AM_CFLAGS) -I$(ul_libmount_incdir) -I$(ul_libblkid_incdir)
 endif
 
 
-if BUILD_ELVTUNE
-sbin_PROGRAMS += elvtune
-dist_man_MANS += disk-utils/elvtune.8
-elvtune_SOURCES = disk-utils/elvtune.c
-elvtune_LDADD = $(LDADD) libcommon.la
-endif
-
-
 if BUILD_RAW
 sbin_PROGRAMS += raw
 dist_man_MANS += disk-utils/raw.8
diff --git a/disk-utils/elvtune.8 b/disk-utils/elvtune.8
deleted file mode 100644 (file)
index 0554269..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-.\" -*- nroff -*-
-.TH ELVTUNE 8 "March 2000" "util-linux" "System Administration"
-.SH NAME
-elvtune \- I/O elevator tuner
-.SH SYNOPSIS
-.B elvtune
-.RB [ \-r
-.IR r_lat ]
-.RB [ \-w
-.IR w_lat ]
-.RB [ \-b
-.IR b_max ]
-.IR device ...
-.br
-.B elvtune \-h
-.br
-.B elvtune \-v
-.SH DESCRIPTION
-.B elvtune
-allows to tune the I/O elevator per blockdevice queue.  The
-tuning can be safely done at runtime.  Tuning the elevator means
-being able to change disk performance and interactiveness.
-In the output of
-.B elvtune
-the address of the queue tuned will be shown;
-it can be considered as a queue ID.
-Multiple partitions on the same harddisk will
-share the same queue and so tuning one partition will be
-like tuning the whole HD.
-.SH OPTIONS
-.TP
-.BI -r \ r_lat
-Set the maximum latency that the I/O scheduler will provide on
-each read.
-.TP
-.BI -w \ w_lat
-Set the maximum latency that the I/O scheduler will provide on
-each write.
-.TP
-.BI -b \ b_max
-Set the maximum coalescing factor allowed on writes when there are reads
-pending in the queue.
-.TP
-.BI -h
-Display help text and exit.
-.TP
-.BI -v
-Display version information and exit.
-.SH NOTE
-Actually, the only fields tunable are those relative
-to the IO scheduler.  It's not possible to select
-a one-way or two-way elevator yet.
-.PP
-For logical blockdevices like LVM the tuning has to
-be done on the
-.I physical
-devices.  Tuning the queue of the LVM logical device
-is useless.
-.SH RETURN VALUE
-0 on success and 1 on failure.
-.SH HISTORY
-Ioctls for tuning elevator behaviour were added in Linux 2.3.99-pre1.
-.SH AUTHORS
-Andrea Arcangeli <andrea@suse.de> SuSE
-.SH AVAILABILITY
-The elvtune command is part of the util-linux package and is available from
-ftp://ftp.kernel.org/pub/linux/utils/util-linux/.
diff --git a/disk-utils/elvtune.c b/disk-utils/elvtune.c
deleted file mode 100644 (file)
index aa13c06..0000000
+++ /dev/null
@@ -1,174 +0,0 @@
-/*
- *  elvtune.c - I/O elevator tuner
- *
- *  Copyright (C) 2000 Andrea Arcangeli <andrea@suse.de> SuSE
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License along
- *  with this program; if not, write to the Free Software Foundation, Inc.,
- *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-/*
- * This command is deprecated.  The utility is in maintenance mode,
- * meaning we keep them in source tree for backward compatibility
- * only.  Do not waste time making this command better, unless the
- * fix is about security or other very critical issue.
- *
- * See Documentation/deprecated.txt for more information.
- */
-
-#include <fcntl.h>
-#include <errno.h>
-#include <stdio.h>
-#include <getopt.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/ioctl.h>
-#include <sys/utsname.h>
-#include "nls.h"
-#include "blkdev.h"
-#include "closestream.h"
-#include "linux_version.h"
-
-/* this has to match with the kernel structure */
-/* current version for ac19 and 2.2.16 */
-typedef struct blkelv_ioctl_arg_s {
-       int queue_ID;
-       int read_latency;
-       int write_latency;
-       int max_bomb_segments;
-} blkelv_ioctl_arg_t;
-
-static void
-usage(void) {
-       fprintf(stderr, "elvtune (%s)\n", PACKAGE_STRING);
-       fprintf(stderr, _("usage:\n"));
-       fprintf(stderr, "\telvtune [-r r_lat] [-w w_lat] [-b b_lat]"
-                       " /dev/blkdev1 [/dev/blkdev2...]\n");
-       fprintf(stderr, "\telvtune -h\n");
-       fprintf(stderr, "\telvtune -v\n");
-       fprintf(stderr, _("\tNOTE: elvtune only works with 2.4 kernels\n"));
-       /* (ioctls exist in 2.2.16 - 2.5.57) */
-}
-
-static void
-version(void) {
-       fprintf(stderr, UTIL_LINUX_VERSION);
-}
-
-int
-main(int argc, char * argv[]) {
-       int read_value = 0xbeefbeef, write_value = 0xbeefbeef, bomb_value = 0xbeefbeef;
-       int read_set, write_set, bomb_set, set;
-       char * devname;
-       int fd;
-       blkelv_ioctl_arg_t elevator;
-
-       read_set = write_set = bomb_set = set = 0;
-
-       setlocale(LC_MESSAGES, "");
-       bindtextdomain(PACKAGE, LOCALEDIR);
-       textdomain(PACKAGE);
-       atexit(close_stdout);
-
-       for (;;) {
-               int opt;
-
-               opt = getopt(argc, argv, "r:w:b:hv");
-               if (opt == -1)
-                       break;
-               switch (opt) {
-               case 'r':
-                       read_value = atoi(optarg);
-                       read_set = set = 1;
-                       break;
-               case 'w':
-                       write_value = atoi(optarg);
-                       write_set = set = 1;
-                       break;
-               case 'b':
-                       bomb_value = atoi(optarg);
-                       bomb_set = set = 1;
-                       break;
-
-               case 'h':
-                       usage(), exit(0);
-               case 'v':
-                       version(), exit(0);
-
-               default:
-                       usage(), exit(1);
-               }
-       }
-
-       if (optind >= argc)
-               fprintf(stderr, _("missing blockdevice, use -h for help\n")), exit(1);
-
-       while (optind < argc) {
-               devname = argv[optind++];
-
-               fd = open(devname, O_RDONLY|O_NONBLOCK);
-               if (fd < 0) {
-                       perror("open");
-                       break;
-               }
-
-               /* mmj: If we get EINVAL it's not a 2.4 kernel, so warn about
-                  that and exit. It should return ENOTTY however, so check for
-                  that as well in case it gets corrected in the future */
-
-               if (ioctl(fd, BLKELVGET, &elevator) < 0) {
-                       int errsv = errno;
-                       perror("ioctl get");
-                       if ((errsv == EINVAL || errsv == ENOTTY) &&
-                           get_linux_version() >= KERNEL_VERSION(2,5,58)) {
-                               fprintf(stderr,
-                                       _("\nelvtune is only useful on older "
-                                       "kernels;\nfor 2.6 use IO scheduler "
-                                       "sysfs tunables instead..\n"));
-                       }
-                       break;
-               }
-
-               if (set) {
-                       if (read_set)
-                               elevator.read_latency = read_value;
-                       if (write_set)
-                               elevator.write_latency = write_value;
-                       if (bomb_set)
-                               elevator.max_bomb_segments = bomb_value;
-
-                       if (ioctl(fd, BLKELVSET, &elevator) < 0) {
-                               perror("ioctl set");
-                               break;
-                       }
-                       if (ioctl(fd, BLKELVGET, &elevator) < 0) {
-                               perror("ioctl reget");
-                               break;
-                       }
-               }
-
-               printf("\n%s elevator ID\t\t%d\n", devname, elevator.queue_ID);
-               printf("\tread_latency:\t\t%d\n", elevator.read_latency);
-               printf("\twrite_latency:\t\t%d\n", elevator.write_latency);
-               printf("\tmax_bomb_segments:\t%d\n\n", elevator.max_bomb_segments);
-
-               if (close(fd) < 0) {
-                       perror("close");
-                       break;
-               }
-       }
-
-       return 0;
-}
index 36757775a4102fee3d56882f176e48e633aa441f..8480205f24797d1a0510ff9e003f9f1f68291e39 100644 (file)
@@ -38,7 +38,6 @@ ctrlaltdel:
 cytune:  
 delpart:  
 dmesg:  
-elvtune:  
 fallocate:  
 fdformat:  
 flock:  
index 1be319bc663766dba8cf8e047d1f2563df0754ce..4890e52bc525edb0f252fc37a3a8aea9785cf14c 100644 (file)
@@ -1,7 +1,6 @@
 mkswap:  libblkid libselinux libuuid 
 swaplabel:  libblkid libuuid 
 blockdev:  
-elvtune:  
 fdformat:  
 fsck.cramfs:  libz 
 fsck.minix:  
index 36757775a4102fee3d56882f176e48e633aa441f..8480205f24797d1a0510ff9e003f9f1f68291e39 100644 (file)
@@ -38,7 +38,6 @@ ctrlaltdel:
 cytune:  
 delpart:  
 dmesg:  
-elvtune:  
 fallocate:  
 fdformat:  
 flock:  
index 1906af17e718f00980fd328eaaada4644cfb1cd8..df15cedc9edc6d6102c6b30a9ed7357e861b92a8 100644 (file)
@@ -38,7 +38,6 @@ ctrlaltdel:
 cytune:  
 delpart:  
 dmesg:  
-elvtune:  
 fallocate:  
 fdformat:  
 flock:  
index 7e83630b8ab0dd7812731ba1933a19e3248276e8..f7c0f865543503999303ab71819ce203b2a69462 100644 (file)
@@ -1,7 +1,6 @@
 mkswap:  libblkid libselinux libuuid 
 swaplabel:  libblkid libuuid 
 blockdev:  
-elvtune:  
 fdformat:  
 fsck.cramfs:  libz 
 fsck.minix:  
index 1906af17e718f00980fd328eaaada4644cfb1cd8..df15cedc9edc6d6102c6b30a9ed7357e861b92a8 100644 (file)
@@ -38,7 +38,6 @@ ctrlaltdel:
 cytune:  
 delpart:  
 dmesg:  
-elvtune:  
 fallocate:  
 fdformat:  
 flock: