diff -Nru iprutils-2.4.15.1/configure iprutils-2.4.16.1/configure --- iprutils-2.4.15.1/configure 2017-06-19 13:37:20.000000000 +0000 +++ iprutils-2.4.16.1/configure 2018-05-08 15:22:14.000000000 +0000 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for iprutils 2.4.15.1. +# Generated by GNU Autoconf 2.69 for iprutils 2.4.16.1. # # Report bugs to . # @@ -590,8 +590,8 @@ # Identity of this package. PACKAGE_NAME='iprutils' PACKAGE_TARNAME='iprutils' -PACKAGE_VERSION='2.4.15.1' -PACKAGE_STRING='iprutils 2.4.15.1' +PACKAGE_VERSION='2.4.16.1' +PACKAGE_STRING='iprutils 2.4.16.1' PACKAGE_BUGREPORT='iprdd-devel@lists.sourceforge.net' PACKAGE_URL='' @@ -1337,7 +1337,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures iprutils 2.4.15.1 to adapt to many kinds of systems. +\`configure' configures iprutils 2.4.16.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1407,7 +1407,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of iprutils 2.4.15.1:";; + short | recursive ) echo "Configuration of iprutils 2.4.16.1:";; esac cat <<\_ACEOF @@ -1518,7 +1518,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -iprutils configure 2.4.15.1 +iprutils configure 2.4.16.1 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1995,7 +1995,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by iprutils $as_me 2.4.15.1, which was +It was created by iprutils $as_me 2.4.16.1, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2859,7 +2859,7 @@ # Define the identity of the package. PACKAGE='iprutils' - VERSION='2.4.15.1' + VERSION='2.4.16.1' cat >>confdefs.h <<_ACEOF @@ -13037,7 +13037,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by iprutils $as_me 2.4.15.1, which was +This file was extended by iprutils $as_me 2.4.16.1, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -13094,7 +13094,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -iprutils config.status 2.4.15.1 +iprutils config.status 2.4.16.1 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -Nru iprutils-2.4.15.1/configure.ac iprutils-2.4.16.1/configure.ac --- iprutils-2.4.15.1/configure.ac 2017-06-19 13:37:02.000000000 +0000 +++ iprutils-2.4.16.1/configure.ac 2018-05-01 20:18:46.000000000 +0000 @@ -10,7 +10,7 @@ AC_PREREQ([2.63]) # For RC releases, version should be set to 2.4.10.0.rc1, 2.4.10.0.rc2, etc. # For GA releases, version should be set to 2.4.10.1, 2.4.10.2, etc. -AC_INIT([iprutils], [2.4.15.1], [iprdd-devel@lists.sourceforge.net]) +AC_INIT([iprutils], [2.4.16.1], [iprdd-devel@lists.sourceforge.net]) AM_INIT_AUTOMAKE([1.9 foreign]) AC_CONFIG_MACRO_DIR([build-aux]) diff -Nru iprutils-2.4.15.1/debian/changelog iprutils-2.4.16.1/debian/changelog --- iprutils-2.4.15.1/debian/changelog 2018-05-05 13:15:43.000000000 +0000 +++ iprutils-2.4.16.1/debian/changelog 2018-05-10 11:37:09.000000000 +0000 @@ -1,3 +1,9 @@ +iprutils (2.4.16.1-1) unstable; urgency=medium + + * New upstream release. + + -- Colin Watson Thu, 10 May 2018 12:37:09 +0100 + iprutils (2.4.15.1-3) unstable; urgency=medium * Move VCS to salsa.debian.org. diff -Nru iprutils-2.4.15.1/debian/.git-dpm iprutils-2.4.16.1/debian/.git-dpm --- iprutils-2.4.15.1/debian/.git-dpm 2017-06-20 10:15:11.000000000 +0000 +++ iprutils-2.4.16.1/debian/.git-dpm 2018-05-10 11:35:40.000000000 +0000 @@ -1,8 +1,8 @@ # see git-dpm(1) from git-dpm package -e2ee71ba36947eef4e296e27b2a28cc23d595760 -e2ee71ba36947eef4e296e27b2a28cc23d595760 -7acc09bcfaac9e6373ada8da28c13a91968b9d50 -7acc09bcfaac9e6373ada8da28c13a91968b9d50 -iprutils_2.4.15.1.orig.tar.gz -ed6c362ee3c6bd9023ee60d0d1a1ce5543c27c41 -524689 +e08b25411dd402c2dd6b32aff456faea9e72c1af +e08b25411dd402c2dd6b32aff456faea9e72c1af +e9d013e6fcd2a3faf03fbb43b91cf933e8ce731d +e9d013e6fcd2a3faf03fbb43b91cf933e8ce731d +iprutils_2.4.16.1.orig.tar.gz +ed73dd2731f4333c0c098481d81ec83fc3f15cc9 +519825 diff -Nru iprutils-2.4.15.1/debian/patches/debian-lsb-logging.patch iprutils-2.4.16.1/debian/patches/debian-lsb-logging.patch --- iprutils-2.4.15.1/debian/patches/debian-lsb-logging.patch 2017-06-20 10:15:11.000000000 +0000 +++ iprutils-2.4.16.1/debian/patches/debian-lsb-logging.patch 2018-05-10 11:35:40.000000000 +0000 @@ -1,4 +1,4 @@ -From 5c829b24a81ab4bdf75c854976ac3384d14aa450 Mon Sep 17 00:00:00 2001 +From 3b31260fcda4b3d476c730194963cd77bf3e7e5a Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Wed, 2 Apr 2014 18:21:43 +0100 Subject: Convert init scripts to Debian LSB logging @@ -8,9 +8,9 @@ Patch-Name: debian-lsb-logging.patch --- - init.d/iprdump.in | 57 +++++++++------------------------------------------ - init.d/iprinit.in | 57 +++++++++------------------------------------------ - init.d/iprupdate.in | 59 +++++++++-------------------------------------------- + init.d/iprdump.in | 57 ++++++++----------------------------------- + init.d/iprinit.in | 57 ++++++++----------------------------------- + init.d/iprupdate.in | 59 ++++++++------------------------------------- 3 files changed, 30 insertions(+), 143 deletions(-) diff --git a/init.d/iprdump.in b/init.d/iprdump.in diff -Nru iprutils-2.4.15.1/debian/patches/do-not-install-iprdumpfmt.8.patch iprutils-2.4.16.1/debian/patches/do-not-install-iprdumpfmt.8.patch --- iprutils-2.4.15.1/debian/patches/do-not-install-iprdumpfmt.8.patch 2017-06-20 10:15:11.000000000 +0000 +++ iprutils-2.4.16.1/debian/patches/do-not-install-iprdumpfmt.8.patch 2018-05-10 11:35:40.000000000 +0000 @@ -1,4 +1,4 @@ -From 96186e9e1828c57c44c1fb6c1dd849f3fe9e8635 Mon Sep 17 00:00:00 2001 +From be8d293984b538df4adda4c9499c328bda618cd6 Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Tue, 19 Jan 2016 23:01:40 +0000 Subject: Don't try to install nonexistent iprdumpfmt.8 diff -Nru iprutils-2.4.15.1/debian/patches/service-start-udev-rule.patch iprutils-2.4.16.1/debian/patches/service-start-udev-rule.patch --- iprutils-2.4.15.1/debian/patches/service-start-udev-rule.patch 2017-06-20 10:15:11.000000000 +0000 +++ iprutils-2.4.16.1/debian/patches/service-start-udev-rule.patch 2018-05-10 11:35:40.000000000 +0000 @@ -1,4 +1,4 @@ -From e2ee71ba36947eef4e296e27b2a28cc23d595760 Mon Sep 17 00:00:00 2001 +From e08b25411dd402c2dd6b32aff456faea9e72c1af Mon Sep 17 00:00:00 2001 From: Jakub Cajka Date: Wed, 8 Jul 2015 12:48:43 -0300 Subject: Service start is controled by udev rule diff -Nru iprutils-2.4.15.1/debian/patches/upstart-compatibility.patch iprutils-2.4.16.1/debian/patches/upstart-compatibility.patch --- iprutils-2.4.15.1/debian/patches/upstart-compatibility.patch 2017-06-20 10:15:11.000000000 +0000 +++ iprutils-2.4.16.1/debian/patches/upstart-compatibility.patch 2018-05-10 11:35:40.000000000 +0000 @@ -1,4 +1,4 @@ -From 2bba6c0ef7082018b0015aeda0dbeeda0812a408 Mon Sep 17 00:00:00 2001 +From 3c3491e9e0713237007fa15b4b6cdfb247cd8cce Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Wed, 2 Apr 2014 17:12:00 +0100 Subject: Make init scripts exit if running under Upstart diff -Nru iprutils-2.4.15.1/iprconfig.c iprutils-2.4.16.1/iprconfig.c --- iprutils-2.4.15.1/iprconfig.c 2017-04-19 15:55:24.000000000 +0000 +++ iprutils-2.4.16.1/iprconfig.c 2018-04-25 21:31:46.000000000 +0000 @@ -4102,6 +4102,7 @@ int header_lines; int toggle = 0; struct screen_output *s_out; + int is_ri_count = 0, non_ri_count = 0; rc = RC_SUCCESS; @@ -4113,12 +4114,24 @@ print_dev(k, cur_raid_cmd->dev, buffer, "1", k); for_each_af_dasd(ioa, dev) { - if (dev->dev_rcd->issue_cmd) + if (dev->dev_rcd->issue_cmd) { print_dev(k, dev, buffer, "1", k); + if (dev->block_dev_class & IPR_SSD) { + if (dev->read_intensive & IPR_RI) + is_ri_count++; + else + non_ri_count++; + } + } } } } + if (is_ri_count > 0 && non_ri_count > 0) { + rc = RC_95_Mixed_RISSD_SSDs; + return rc; + } + toggle_field = 0; do { @@ -11842,7 +11855,7 @@ if (!ioa->ioa.scsi_dev_data || ioa->ioa_dead) continue; - for_each_dev (ioa, dev) { + for_ioa_and_each_dev (ioa, dev) { if (ipr_is_volume_set(dev)) continue; @@ -14115,6 +14128,7 @@ { int i, num_devs = 0, ssd_num_devs = 0, rc, prot_level; int non_4k_count = 0, is_4k_count = 0; + int non_ri_count = 0, is_ri_count = 0; int next_raid_level, next_stripe_size, next_qdepth, next_label; char *raid_level = IPR_DEFAULT_RAID_LVL; char label[8]; @@ -14210,6 +14224,12 @@ is_4k_count++; else non_4k_count++; + + if (dev->block_dev_class & IPR_SSD) + if (dev->read_intensive & IPR_RI) + is_ri_count++; + else + non_ri_count++; } if (is_4k_count > 0 && non_4k_count > 0) { @@ -14217,6 +14237,11 @@ return -EINVAL; } + if (is_ri_count > 0 && non_ri_count > 0) { + syslog(LOG_ERR, _("SSD disks and RI SSD disks can not be mixed in an array.\n")); + return -EINVAL; + } + if (!ioa) { syslog(LOG_ERR, _("No valid devices specified.\n")); return -EINVAL; @@ -15754,7 +15779,7 @@ for_each_ioa(ioa) { if (!ioa->ioa.scsi_dev_data) continue; - for_each_dev(ioa, dev) { + for_ioa_and_each_dev(ioa, dev) { if (ipr_is_volume_set(dev)) continue; @@ -19408,11 +19433,15 @@ static int non_intenactive_cmd(char *cmd, char **args, int num_args) { int rc, i; + int show_details = 0; exit_func = cmdline_exit_func; closelog(); openlog("iprconfig", LOG_PERROR | LOG_PID | LOG_CONS, LOG_USER); - check_current_config(false); + if (!strcmp("show-details", cmd)) + show_details = 1; + + __check_current_config(false, show_details); for (i = 0; i < ARRAY_SIZE(command); i++) { if (strcmp(cmd, command[i].cmd) != 0) diff -Nru iprutils-2.4.15.1/iprconfig.h iprutils-2.4.16.1/iprconfig.h --- iprutils-2.4.15.1/iprconfig.h 2016-04-05 12:11:35.000000000 +0000 +++ iprutils-2.4.16.1/iprconfig.h 2018-04-25 21:31:46.000000000 +0000 @@ -1717,6 +1717,7 @@ /* 92 */ __("Create disk array failed - can not build with read intensive disks only."), /* 93 */ __("All devices up to date"), /* 94 */ __("Temporary log file creation failed: %s"), + /* 95 */ __("Create disk array failed - can not mix SSDs and RI SSDs."), /* NOTE: 127 maximum limit */ }; @@ -1818,6 +1819,7 @@ RC_92_UNSUPT_REQ_BLK_DEV_CLASS, RC_93_All_Up_To_Date, RC_94_Tmp_Log_Fail, + RC_95_Mixed_RISSD_SSDs, /* NOTE: 127 maximum limit */ }; diff -Nru iprutils-2.4.15.1/iprlib.c iprutils-2.4.16.1/iprlib.c --- iprutils-2.4.15.1/iprlib.c 2017-06-16 21:10:01.000000000 +0000 +++ iprutils-2.4.16.1/iprlib.c 2018-04-25 21:27:18.000000000 +0000 @@ -6552,13 +6552,14 @@ } /** - * check_current_config - populates the ioa configuration data + * __check_current_config - populates the ioa configuration data * @allow_rebuild_refresh: allow_rebuild_refresh flag + * @device_details_only: Skip commands not needed for show-details * * Returns: * nothing **/ -void check_current_config(bool allow_rebuild_refresh) +void __check_current_config(bool allow_rebuild_refresh, bool device_details_only) { struct scsi_dev_data *scsi_dev_data; int num_sg_devices, rc, device_count, j, k; @@ -6695,7 +6696,7 @@ /* Send Test Unit Ready to start device if its a volume set */ /* xxx TODO try to remove this */ - if (!ipr_fast && ipr_is_volume_set(&ioa->dev[device_count])) + if (!ipr_fast && ipr_is_volume_set(&ioa->dev[device_count]) && !device_details_only) __ipr_test_unit_ready(&ioa->dev[device_count], &sense_data); device_count++; @@ -6743,7 +6744,7 @@ for_each_ra(ra, dev) memcpy(ra, &res_addr, sizeof(*ra)); - if (ipr_is_gscsi(dev) || ipr_is_af_dasd_device(dev)) + if (ipr_is_gscsi(dev) || ipr_is_af_dasd_device(dev) && !device_details_only) init_inquiry_c7(dev); if (!dev->qac_entry) @@ -6842,6 +6843,11 @@ } } +void check_current_config(bool allow_rebuild_refresh) +{ + __check_current_config(allow_rebuild_refresh, 0); +} + /** * num_devices_opens - return usage count (number of opens) for a given device * @host_num: host number @@ -8369,8 +8375,11 @@ struct ipr_fw_images *first = (struct ipr_fw_images *)parm1; struct ipr_fw_images *second = (struct ipr_fw_images *)parm2; - return memcmp(&second->version, &first->version, - sizeof(second->version)); + if (first->version < second->version) + return 1; + if (second->version > first->version) + return -1; + return 0; } /** diff -Nru iprutils-2.4.15.1/iprlib.h iprutils-2.4.16.1/iprlib.h --- iprutils-2.4.15.1/iprlib.h 2017-06-16 21:10:01.000000000 +0000 +++ iprutils-2.4.16.1/iprlib.h 2018-05-01 18:08:37.000000000 +0000 @@ -1594,6 +1594,10 @@ #define for_each_dev(i, d) for (d = (i)->dev; (d - (i)->dev) < (i)->num_devices; d++) +#define for_ioa_and_each_dev(i, d) for (d = &((i)->ioa); \ + (d == &((i)->ioa)) || ((d - (i)->dev) < (i)->num_devices); \ + d = (d == &((i)->ioa)) ? (i)->dev : d + 1) + #define for_each_hotplug_dev(i, d) \ for_each_dev(i, d) \ if (ipr_is_af_dasd_device(d) || ipr_is_gscsi(d)) @@ -2811,6 +2815,7 @@ int set_ha_mode(struct ipr_ioa *, int); int set_preferred_primary(struct ipr_ioa *, int); void check_current_config(bool); +void __check_current_config(bool, bool); int num_device_opens(int, int, int, int); int open_and_lock(char *); int tool_init(int); diff -Nru iprutils-2.4.15.1/spec/iprutils.spec iprutils-2.4.16.1/spec/iprutils.spec --- iprutils-2.4.15.1/spec/iprutils.spec 2017-06-19 13:37:02.000000000 +0000 +++ iprutils-2.4.16.1/spec/iprutils.spec 2018-05-01 20:22:00.000000000 +0000 @@ -1,6 +1,6 @@ Summary: Utilities for the IBM Power Linux RAID adapters Name: iprutils -Version: 2.4.15 +Version: 2.4.16 # For RC releases, release_prefix should be set to 0.rc1, 0.rc2, etc. # For GA releases, release_prefix should be set to 1, 2, 3, etc. %define release_prefix 1 @@ -322,6 +322,11 @@ %endif #WITH_STATIC %changelog +* Tue May 1 2018 Brian King 2.4.16 +- Speedup for show-details +- Improve error messages when creating the arrays with RI and non-RI disks +- Fix download microcode to all devices +- Fix microcode image sorting on little endian systems * Mon Jun 19 2017 Brian King 2.4.15 - Released iprutils 2.4.15 - Enable write cache policy for JBODs