Hello community, here is the log from the commit of package iprutils for openSUSE:Factory checked in at 2016-08-11 18:53:14 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/iprutils (Old) and /work/SRC/openSUSE:Factory/.iprutils.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "iprutils" Changes: -------- --- /work/SRC/openSUSE:Factory/iprutils/iprutils.changes 2016-04-16 22:08:05.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.iprutils.new/iprutils.changes 2016-08-11 18:53:15.000000000 +0200 @@ -1,0 +2,21 @@ +Fri Aug 5 11:31:16 UTC 2016 - [email protected] + +- version update to 2.4.12 (FATE#319567, bsc#992141) + - Display higher link rates in path details + - Flush unused multipaths prior to array delete + - Collect additional logs with iprsos + - Display sr device name + - Fix format timeout issue on little endian systems + - Format timeout and format block size fixes + - Remove unnecessary iprconfig prompt on exit + - Save known zeroed state for command line format + - Fix find_multipath_jbod to never return itself + - Ensure device known zeroed state gets saved after format + - Fix for hotplug disk with Slider drawer + +------------------------------------------------------------------- +Thu Apr 14 08:43:43 UTC 2016 - [email protected] + +- cleanup spec file + +------------------------------------------------------------------- @@ -45,0 +67 @@ + - do not stop ipr daemons when reading sysfs fails (bsc#930695) @@ -53,0 +76,2 @@ + * iprutils.bug-908952_show_disks_and_pyhiscal_location.patch + * iprutils.bug-923181_fix_create_raid_level.patch @@ -58,0 +83,16 @@ + +------------------------------------------------------------------- +Wed Apr 8 14:20:55 UTC 2015 - [email protected] + +- fix create raid level (bsc#923181) + +- added patches: + * iprutils.bug-923181_fix_create_raid_level.patch + +------------------------------------------------------------------- +Mon Feb 2 09:46:42 UTC 2015 - [email protected] + +- fix for showing up disks/platform locations (bsc#908952) + +- added patches: + * iprutils.bug-908952_show_disks_and_pyhiscal_location.patch Old: ---- iprutils-2.4.11.tar.gz New: ---- iprutils-2.4.12.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ iprutils.spec ++++++ --- /var/tmp/diff_new_pack.98wHre/_old 2016-08-11 18:53:16.000000000 +0200 +++ /var/tmp/diff_new_pack.98wHre/_new 2016-08-11 18:53:16.000000000 +0200 @@ -19,7 +19,7 @@ Name: iprutils # NOTE: package's changelog is hidden in % changelog section # in file iprutils/spec/iprutils.spec -Version: 2.4.11 +Version: 2.4.12 Release: 0 %define ibmformat %(sed 's/\\./-/g' <<< %{version}) Summary: Utilities for the IBM Power Linux RAID Adapters ++++++ iprutils-2.4.11.tar.gz -> iprutils-2.4.12.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/iprutils-rel-2-4-11/configure.ac new/iprutils-rel-2-4-12/configure.ac --- old/iprutils-rel-2-4-11/configure.ac 2016-04-06 18:20:59.000000000 +0200 +++ new/iprutils-rel-2-4-12/configure.ac 2016-08-04 13:17:49.000000000 +0200 @@ -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.11.1], [[email protected]]) +AC_INIT([iprutils], [2.4.12.1], [[email protected]]) AM_INIT_AUTOMAKE([1.9 foreign]) AC_CONFIG_MACRO_DIR([build-aux]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/iprutils-rel-2-4-11/iprconfig.c new/iprutils-rel-2-4-12/iprconfig.c --- old/iprutils-rel-2-4-11/iprconfig.c 2016-04-06 18:20:59.000000000 +0200 +++ new/iprutils-rel-2-4-12/iprconfig.c 2016-08-04 13:17:49.000000000 +0200 @@ -1649,6 +1649,9 @@ return; } + if (ipr_device_lock(dev)) + return; + if (ipr_is_af(dev)) { if ((rc = ipr_query_command_status(dev, &cmd_status))) return; @@ -1675,6 +1678,8 @@ } } } + + ipr_device_unlock(dev); } /** @@ -7516,6 +7521,7 @@ elem_status->select = 1; elem_status->insert = 1; elem_status->identify = 1; + elem_status->enable_byp = 0; } overall = ipr_get_overall_elem(&ses_data, &ses_cfg); @@ -8818,6 +8824,8 @@ evaluate_device(dev->dev, ioa, dev->new_block_size); } + ipr_device_unlock(dev->dev); + if (ipr_is_af_blk_size(ioa, dev->new_block_size) || ipr_is_af_dasd_device(dev->dev)) ipr_add_zeroed_dev(dev->dev); } @@ -8944,7 +8952,7 @@ } /* Issue the format. Failure will be detected by query command status */ - rc = ipr_format_unit(cur_dev_init->dev); /* FIXME Mandatory lock? */ + rc = ipr_format_unit(cur_dev_init->dev); } else if (cur_dev_init->do_init && cur_dev_init->dev_type == IPR_JBOD_DASD_DEVICE) { num_devs++; @@ -9011,8 +9019,13 @@ syslog(LOG_ERR, "Could not unbind %s: %m\n", cur_dev_init->dev->dev_name); - /* Issue format */ - status = ipr_format_unit(cur_dev_init->dev); /* FIXME Mandatory lock? */ + status = 0; + + if (ipr_is_af_blk_size(ioa, cur_dev_init->new_block_size)) + status = ipr_device_lock(cur_dev_init->dev); + + if (!status) + status = ipr_format_unit(cur_dev_init->dev); if (status) { /* Send a device reset to cleanup any old state */ @@ -9023,6 +9036,7 @@ "Could not bind %s: %m\n", cur_dev_init->dev->dev_name); + ipr_device_unlock(cur_dev_init->dev); cur_dev_init->do_init = 0; num_devs--; failure++; @@ -13063,8 +13077,8 @@ "1.5Gbps", "3.0Gbps", "6.0Gbps", - "Enabled", - "Enabled", + "12.0Gbps", + "22.5Gbps", "Enabled", "Enabled", "Enabled" @@ -13998,6 +14012,7 @@ } rc = send_dev_inits(NULL); + set_devs_format_completed(); free_devs_to_init(); return IPR_XLATE_DEV_FMT_RC(rc); } @@ -15041,6 +15056,7 @@ elem_status->remove = 0; elem_status->insert = on; elem_status->identify = on; + elem_status->enable_byp = 0; overall = ipr_get_overall_elem(&ses_data, &ses_cfg); overall->select = 1; @@ -19457,6 +19473,21 @@ while (head_zdev) { struct screen_output *s_out; i_container *i_con; + struct ipr_ioa *ioa; + struct ipr_dev *dev; + int num_zeroed = 0; + + for_each_ioa(ioa) { + for_each_af_dasd(ioa, dev) { + if (ipr_device_is_zeroed(dev) && + !ipr_known_zeroed_is_saved(dev)) { + num_zeroed++; + } + } + } + + if (!num_zeroed) + break; n_exit_confirm.body = body_init(n_exit_confirm.header, NULL); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/iprutils-rel-2-4-11/iprlib.c new/iprutils-rel-2-4-12/iprlib.c --- old/iprutils-rel-2-4-11/iprlib.c 2016-04-06 18:20:59.000000000 +0200 +++ new/iprutils-rel-2-4-12/iprlib.c 2016-08-04 13:17:49.000000000 +0200 @@ -2706,6 +2706,19 @@ return rc; } +static void ipr_mpath_flush() +{ + int pid, status; + + /* flush unused multipath device maps */ + pid = fork(); + if (pid == 0) { + execlp("multipath", "-F", NULL); + _exit(errno); + } else + waitpid(pid, &status, 0); +} + /** * ipr_stop_array_protection - Stop array protection for an array * @ioa: ipr ioa struct @@ -2715,6 +2728,7 @@ **/ int ipr_stop_array_protection(struct ipr_ioa *ioa) { + ipr_mpath_flush(); return ipr_stop_array(ioa, "Stop Array Protection", 0); } @@ -3722,6 +3736,9 @@ continue; for_each_dev(ioa, multipath_dev) { + if (multipath_dev == dev) + continue; + if (multipath_dev->scsi_dev_data && id == multipath_dev->scsi_dev_data->device_id) return multipath_dev; @@ -3732,6 +3749,50 @@ return NULL; } +int ipr_device_lock(struct ipr_dev *dev) +{ + int fd, rc; + char *name = dev->gen_name; + + if (strlen(name) == 0) + return -ENOENT; + + if (dev->locked) { + scsi_err(dev, "Device already locked\n"); + return -EINVAL; + } + + fd = open(name, O_RDWR); + if (fd <= 1) { + if (!strcmp(tool_name, "iprconfig") || ipr_debug) + syslog(LOG_ERR, "Could not open %s. %m\n", name); + return errno; + } + + rc = flock(fd, LOCK_EX); + + if (rc) { + if (!strcmp(tool_name, "iprconfig") || ipr_debug) + syslog(LOG_ERR, "Could not lock %s. %m\n", name); + close(fd); + return errno; + } + + /* Do not close the file descriptor here as we want to hold onto the lock */ + dev->locked = 1; + dev->lock_fd = fd; + return rc; +} + +void ipr_device_unlock(struct ipr_dev *dev) +{ + if (dev->locked) { + close(dev->lock_fd); + dev->locked = 0; + dev->lock_fd = 0; + } +} + /** * ipr_format_unit - * @dev: ipr dev struct @@ -3748,18 +3809,8 @@ int length = IPR_DEFECT_LIST_HDR_LEN; char *name = dev->gen_name; - if (strlen(dev->dev_name) && dev->scsi_dev_data->device_id) { - int pid, status; - - /* flush unused multipath device maps */ - pid = fork(); - if (pid == 0) { - execlp("multipath", "-F", NULL); - _exit(errno); - } else { - waitpid(pid, &status, 0); - } - } + if (strlen(dev->dev_name) && dev->scsi_dev_data->device_id) + ipr_mpath_flush(); if (strlen(name) == 0) return -ENOENT; @@ -5878,7 +5929,7 @@ while((dent = readdir(dirfd)) != NULL) { if (dent->d_name[0] == '.') continue; - if (strncmp(dent->d_name, "sd", 2)) + if (strncmp(dent->d_name, "sd", 2) && strncmp(dent->d_name, "sr", 2)) continue; sprintf(scsi_dev_table[i].dev_name, "/dev/%s", dent->d_name); @@ -6419,6 +6470,74 @@ } /** + * init_inquiry_c7 - Page 0xC7 Inquiry to disks + * @dev: ipr dev struct + * + * Setup IBM vendor unique settings + * + * Returns: + * 0 if success / other on failure + **/ +static int init_inquiry_c7(struct ipr_dev *dev) +{ + struct ipr_sas_inquiry_pageC7 inq; + int rc; + + if (dev->read_c7) + return 0; + + if (!dev->scsi_dev_data || strncmp(dev->scsi_dev_data->vendor_id, "IBM", 3)) { + if (ipr_is_gscsi(dev)) { + if (ipr_get_logical_block_size(dev) == IPR_JBOD_4K_BLOCK_SIZE) { + dev->block_dev_class |= IPR_BLK_DEV_CLASS_4K; + dev->supports_4k = 1; + } else { + dev->block_dev_class &= ~IPR_BLK_DEV_CLASS_4K; + dev->supports_5xx = 1; + } + } + + dev->format_timeout = IPR_FORMAT_UNIT_TIMEOUT; + scsi_dbg(dev, "Skipping IBM vendor settings for non IBM device.\n"); + return -EINVAL; + } + + memset(&inq, 0, sizeof(inq)); + + rc = ipr_inquiry(dev, 0xC7, &inq, sizeof(inq)); + + if (rc) { + scsi_dbg(dev, "Inquiry 0xC7 failed. rc=%d\n", rc); + return rc; + } + + switch (inq.support_4k_modes) { + case ONLY_5XX_SUPPORTED: + dev->supports_5xx = 1; + dev->supports_4k = 0; + dev->block_dev_class &= ~IPR_BLK_DEV_CLASS_4K; + scsi_dbg(dev, "Only 5xx supported.\n"); + break; + case ONLY_4K_SUPPORTED: + dev->supports_4k = 1; + dev->block_dev_class |= IPR_BLK_DEV_CLASS_4K; + scsi_dbg(dev, "Only 4k supported.\n"); + break; + case BOTH_5XXe_OR_4K_SUPPORTED: + default: + dev->supports_5xx = 1; + dev->supports_4k = 1; + dev->block_dev_class |= IPR_BLK_DEV_CLASS_4K; + scsi_dbg(dev, "Both 4k and 5xx supported.\n"); + break; + }; + + dev->read_c7 = 1; + dev->format_timeout = ((inq.format_timeout_hi << 8) | inq.format_timeout_lo) * 60; + return 0; +} + +/** * check_current_config - populates the ioa configuration data * @allow_rebuild_refresh: allow_rebuild_refresh flag * @@ -6520,10 +6639,6 @@ IPR_DEV_CACHE_WRITE_THROUGH; } - if (scsi_dev_data->type == TYPE_DISK) { - if (ipr_get_logical_block_size(&ioa->dev[device_count]) == IPR_JBOD_4K_BLOCK_SIZE) - ioa->dev[device_count].block_dev_class |= IPR_BLK_DEV_CLASS_4K; - } /* find array config data matching resource entry */ k = 0; for_each_qac_entry(common_record, qac_data) { @@ -6623,7 +6738,10 @@ for_each_ra(ra, dev) memcpy(ra, &res_addr, sizeof(*ra)); - if (!dev || !dev->qac_entry) + if (ipr_is_gscsi(dev) || ipr_is_af_dasd_device(dev)) + init_inquiry_c7(dev); + + if (!dev->qac_entry) continue; if (dev->qac_entry->record_id == IPR_RECORD_ID_DEVICE_RECORD) { @@ -7203,7 +7321,9 @@ int rc, i, records, timeout; char temp[100]; - if (ipr_is_af_dasd_device(dev)) { + rc = init_inquiry_c7(dev); + + if (rc && ipr_is_af_dasd_device(dev)) { rc = ipr_query_dasd_timeouts(dev, &tos); if (!rc) { @@ -7212,18 +7332,18 @@ for (i = 0; i < records; i++) { if (tos.record[i].op_code != FORMAT_UNIT) continue; - if (IPR_TIMEOUT_RADIX_IS_MINUTE(tos.record[i].timeout)) - return ((tos.record[i].timeout & IPR_TIMEOUT_MASK) * 60); - if (IPR_TIMEOUT_RADIX_IS_SECONDS(tos.record[i].timeout)) - return tos.record[i].timeout & IPR_TIMEOUT_MASK; + if (IPR_TIMEOUT_RADIX_IS_MINUTE(ntohs(tos.record[i].timeout))) + return ((ntohs(tos.record[i].timeout) & IPR_TIMEOUT_MASK) * 60); + if (IPR_TIMEOUT_RADIX_IS_SECONDS(ntohs(tos.record[i].timeout))) + return ntohs(tos.record[i].timeout) & IPR_TIMEOUT_MASK; scsi_dbg(dev, "Unknown timeout radix: %X\n", - (tos.record[i].timeout & IPR_TIMEOUT_RADIX_MASK)); + (ntohs(tos.record[i].timeout) & IPR_TIMEOUT_RADIX_MASK)); break; } } } - timeout = IPR_FORMAT_UNIT_TIMEOUT; + timeout = dev->format_timeout; rc = ipr_get_saved_dev_attr(dev, IPR_FORMAT_TIMEOUT, temp); if (rc == RC_SUCCESS) sscanf(temp, "%d", &timeout); @@ -7281,10 +7401,10 @@ timeouts.record[ARRAY_SIZE(ipr_dasd_timeouts)].op_code = FORMAT_UNIT; if (format_timeout >= IPR_TIMEOUT_MASK) { timeouts.record[ARRAY_SIZE(ipr_dasd_timeouts)].timeout = - (format_timeout / 60) | IPR_TIMEOUT_MINUTE_RADIX; + htons((format_timeout / 60) | IPR_TIMEOUT_MINUTE_RADIX); } else { timeouts.record[ARRAY_SIZE(ipr_dasd_timeouts)].timeout = - format_timeout; + htons(format_timeout); } } @@ -7350,6 +7470,26 @@ return 0; } +int ipr_known_zeroed_is_saved(struct ipr_dev *dev) +{ + int len; + struct ipr_mode_pages mode_pages; + struct ipr_ioa_mode_page *page; + + memset(&mode_pages, 0, sizeof(mode_pages)); + + if (!ipr_mode_sense(dev, 0x20, &mode_pages)) { + page = (struct ipr_ioa_mode_page *) (((u8 *)&mode_pages) + + mode_pages.hdr.block_desc_len + + sizeof(mode_pages.hdr)); + + if (page->format_completed) + return 1; + } + + return 0; +} + int ipr_set_format_completed_bit(struct ipr_dev *dev) { int len; @@ -9741,11 +9881,12 @@ for_each_dev(ioa, dev) { dev->local_flag = 0; - if (ipr_improper_device_type(dev)) { + if (ipr_improper_device_type(dev) && !ipr_device_lock(dev)) { improper++; dev->local_flag = 1; scsi_dbg(dev, "Deleting improper device\n"); ipr_write_dev_attr(dev, "delete", "1"); + ipr_device_unlock(dev); } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/iprutils-rel-2-4-11/iprlib.h new/iprutils-rel-2-4-12/iprlib.h --- old/iprutils-rel-2-4-11/iprlib.h 2016-04-06 18:20:59.000000000 +0200 +++ new/iprutils-rel-2-4-12/iprlib.h 2016-08-04 13:17:49.000000000 +0200 @@ -1481,6 +1481,12 @@ u32 is_suspend_cand:1; u32 is_resume_cand:1; u8 write_cache_policy:1; + u8 supports_4k:1; + u8 supports_5xx:1; + u8 read_c7:1; + u8 locked:1; + int lock_fd; + u32 format_timeout; struct scsi_dev_data *scsi_dev_data; struct ipr_dev *ses[IPR_DEV_MAX_PATHS]; struct ipr_res_addr res_addr[IPR_DEV_MAX_PATHS]; @@ -2600,7 +2606,9 @@ u8 reserved5:1; u8 fault_requested:1; u8 fault_sensed:1; - u8 reserved6:4; + u8 reserved6:1; + u8 enable_byp:2; + u8 reserved7:1; u8 disable_resets:1; #elif defined (__LITTLE_ENDIAN_BITFIELD) u8 status:4; @@ -2620,7 +2628,9 @@ u8 reserved3:4; u8 disable_resets:1; - u8 reserved6:4; + u8 reserved7:1; + u8 enable_byp:2; + u8 reserved6:1; u8 fault_sensed:1; u8 fault_requested:1; u8 reserved5:1; @@ -2692,9 +2702,17 @@ u8 reserved1; u8 page_length; u8 ascii_len; - u8 reserved2[109]; + u8 reserved2[38]; + u8 format_timeout_hi; /* in minutes */ + u8 format_timeout_lo; + u8 reserved3[63]; + u8 support_4k_modes; +#define ONLY_5XX_SUPPORTED 0 +#define BOTH_5XXe_OR_4K_SUPPORTED 1 +#define ONLY_4K_SUPPORTED 2 + u8 reserved4[5]; u8 total_bytes_warranty[IPR_SAS_INQ_BYTES_WARRANTY_LEN]; - u8 reserved3[43]; + u8 reserved5[43]; }; static inline int ipr_elem_offset(struct ipr_ses_config_pg *ses_cfg, u8 type) @@ -2934,6 +2952,7 @@ int ipr_jbod_sysfs_bind(struct ipr_dev *, u8); int ipr_max_queue_depth(struct ipr_ioa *ioa, int num_devs, int num_ssd_devs); void ipr_count_devices_in_vset(struct ipr_dev *, int *num_devs, int *ssd_num_devs); +int ipr_known_zeroed_is_saved(struct ipr_dev *); static inline u32 ipr_get_dev_res_handle(struct ipr_ioa *ioa, struct ipr_dev_record *dev_rcd) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/iprutils-rel-2-4-11/iprsos new/iprutils-rel-2-4-12/iprsos --- old/iprutils-rel-2-4-11/iprsos 2016-04-06 18:20:59.000000000 +0200 +++ new/iprutils-rel-2-4-12/iprsos 2016-08-04 13:17:49.000000000 +0200 @@ -67,6 +67,26 @@ echo echo "=== Contents of '/var/log/messages' ===" cat /var/log/messages + + if [ -f /var/log/dmesg ]; then + echo "=== Contents of '/var/log/dmesg' ===" + cat /var/log/dmesg + fi + + if [ -f /var/log/boot.msg ]; then + echo "=== Contents of '/var/log/boot.msg' ===" + cat /var/log/boot.msg + fi + + if [ -f /var/log/kern.log ]; then + echo "=== Contents of '/var/log/kern.log' ===" + cat /var/log/kern.log + fi + + if [ -f /var/log/syslog ]; then + echo "=== Contents of '/var/log/syslog' ===" + cat /var/log/syslog + fi } function _run_sos() { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/iprutils-rel-2-4-11/spec/iprutils.spec new/iprutils-rel-2-4-12/spec/iprutils.spec --- old/iprutils-rel-2-4-11/spec/iprutils.spec 2016-04-06 18:20:59.000000000 +0200 +++ new/iprutils-rel-2-4-12/spec/iprutils.spec 2016-08-04 13:17:49.000000000 +0200 @@ -1,10 +1,10 @@ Summary: Utilities for the IBM Power Linux RAID adapters Name: iprutils -Version: 2.4.11 +Version: 2.4.12 # 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 -Release: %{release_prefix}.1 +Release: %{release_prefix} License: CPL Group: System Environment/Base Vendor: IBM @@ -322,6 +322,18 @@ %endif #WITH_STATIC %changelog +* Thu Aug 04 2016 Brian King <[email protected]> 2.4.12 +- Display higher link rates in path details +- Flush unused multipaths prior to array delete +- Collect additional logs with iprsos +- Display sr device name +- Fix format timeout issue on little endian systems +- Format timeout and format block size fixes +- Remove unnecessary iprconfig prompt on exit +- Save known zeroed state for command line format +- Fix find_multipath_jbod to never return itself +- Ensure device known zeroed state gets saved after format +- Fix for hotplug disk with Slider drawers * Wed Apr 06 2016 Brian King <[email protected]> 2.4.11 - Miscellaneous fixes, code cleanups, build infrastructure cleanup - Support for new disk enclosures
