Hello community,
here is the log from the commit of package iprutils
checked in at Thu Nov 20 15:30:33 CET 2008.
--------
--- iprutils/iprutils.changes 2008-10-28 08:57:19.000000000 +0100
+++ /mounts/work_src_done/STABLE/iprutils/iprutils.changes 2008-11-18 17:27:28.000000000 +0100
@@ -1,0 +2,7 @@
+Tue Nov 18 17:26:45 CET 2008 - olh@suse.de
+
+- update iprutils to version 2.2.13 (bnc#443674 - LTC49827)
+ Additional fixes for the active-active functionality.
+ Fixes for iprdump to recognize a /sys/devices path.
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
iprupdate.uninizialized.patch
iprutils-2.2.12-src.tar.bz2
New:
----
iprutils-2.2.13-src.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ iprutils.spec ++++++
--- /var/tmp/diff_new_pack.p23296/_old 2008-11-20 15:28:03.000000000 +0100
+++ /var/tmp/diff_new_pack.p23296/_new 2008-11-20 15:28:03.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package iprutils (Version 2.2.12)
+# spec file for package iprutils (Version 2.2.13)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -21,7 +21,7 @@
Name: iprutils
BuildRequires: ncurses-devel pciutils-devel sysfsutils
Summary: Utilities for the IBM Power Linux RAID Adapters
-Version: 2.2.12
+Version: 2.2.13
Release: 1
License: Other uncritical OpenSource License
Url: http://sourceforge.net/projects/iprdd/
@@ -33,7 +33,6 @@
Patch0: iprconfig.usr-sbin.patch
Patch1: iprutils.install-man.patch
Patch2: iprutils.runlevel.patch
-Patch3: iprupdate.uninizialized.patch
%description
Provides a suite of utilities to manage and configure SCSI devices
@@ -50,7 +49,6 @@
%patch0 -p1
%patch1 -p1
%patch2 -p1
-%patch3 -p1
%build
make %{?jobs:-j%jobs} CFLAGS="$RPM_OPT_FLAGS -I/usr/include/ncurses \$(IPR_DEFINES)"
@@ -90,6 +88,10 @@
%attr(755,root,root) /etc/init.d/*
%changelog
+* Tue Nov 18 2008 olh@suse.de
+- update iprutils to version 2.2.13 (bnc#443674 - LTC49827)
+ Additional fixes for the active-active functionality.
+ Fixes for iprdump to recognize a /sys/devices path.
* Tue Oct 28 2008 olh@suse.de
- update iprutils to version 2.2.12 (bnc#435552 - LTC48936)
Additional GUI support and fixes for the active-active functionality.
@@ -202,7 +204,7 @@
Remove some redundant code in disk hotplug path
Fixup status of RAID 10 arrays to print a better status
under multiple failure scenarios.
-* Tue Feb 28 2006 olh@suse.de
+* Mon Feb 27 2006 olh@suse.de
- update to version 2.1.3 (#153800 - LTC22056)
Prevent duplicate mode sense commands from being issued.
More uevent handling improvements.
@@ -309,7 +311,7 @@
backlevel adapter firmware.
* Tue Mar 22 2005 olh@suse.de
- remove requirement from libcap
-* Sun Mar 20 2005 olh@suse.de
+* Sat Mar 19 2005 olh@suse.de
- update to version 2.0.14 (#72125 - LTC14443)
Add support for non-interactive array creation and deletion through
iprconfig.
@@ -331,7 +333,7 @@
Set TST=1 for multi-initiator configurations
Allow Format device for JBOD function to work for JBOD adapters
Fix handling of dead adapters in all of iprutils.
-* Sun Feb 27 2005 olh@suse.de
+* Sat Feb 26 2005 olh@suse.de
- update to version 2.0.13.7 (#63874 - LTC12818)
Fix to support multiple firmware dirs in /etc/hotplug/firmware.agent
Fix use of uninitialized variable in iprconfig.
++++++ iprutils-2.2.12-src.tar.bz2 -> iprutils-2.2.13-src.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/iprutils/init.d/iprdump new/iprutils/init.d/iprdump
--- old/iprutils/init.d/iprdump 2007-08-21 20:56:02.000000000 +0200
+++ new/iprutils/init.d/iprdump 2008-11-18 06:30:23.000000000 +0100
@@ -30,7 +30,7 @@
if [ ! -d /sys/class/scsi_generic ] ; then
modprobe sg
fi
- start_daemon $IPRDUMP
+ start_daemon $IPRDUMP --daemon
RETVAL=$?
if [ $RETVAL -eq 0 ]; then
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/iprutils/init.d/iprupdate new/iprutils/init.d/iprupdate
--- old/iprutils/init.d/iprupdate 2007-08-21 20:56:03.000000000 +0200
+++ new/iprutils/init.d/iprupdate 2008-11-18 06:30:36.000000000 +0100
@@ -30,7 +30,7 @@
if [ ! -d /sys/class/scsi_generic ] ; then
modprobe sg
fi
- $IPRUPDATE --daemon
+ start_daemon $IPRUPDATE --daemon
RETVAL=$?
if [ $RETVAL -eq 0 ]; then
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/iprutils/iprconfig.c new/iprutils/iprconfig.c
--- old/iprutils/iprconfig.c 2008-10-23 18:41:35.000000000 +0200
+++ new/iprutils/iprconfig.c 2008-11-18 06:33:05.000000000 +0100
@@ -3551,7 +3551,7 @@
rc = is_array_in_use(ioa, cur_raid_cmd->array_id);
if (rc != 0) {
/* "Start Parity Protection failed." */
- rc = 19;
+ rc = RC_19_Create_Fail;
syslog(LOG_ERR, _("Devices may have changed state. Command cancelled,"
" please issue commands again if RAID still desired %s.\n"),
ioa->ioa.gen_name);
@@ -3675,12 +3675,12 @@
if (done_bad)
/* Start Parity Protection failed. */
- return 19;
+ return RC_19_Create_Fail;
check_current_config(false);
/* Start Parity Protection completed successfully */
- return 18;
+ return RC_18_Array_Created;
}
not_done = 0;
sleep(1);
@@ -5068,7 +5068,7 @@
start_row = i_con->y + 2;
- num_menu_items = ipr_debug ? 3 : 2;
+ num_menu_items = 3;
menu_item = malloc(sizeof(ITEM **) * (num_menu_items + 1));
userptr = malloc(sizeof(int) * num_menu_items);
@@ -5084,13 +5084,11 @@
set_item_userptr(menu_item[menu_index],
(char *)&userptr[menu_index]);
- if (ipr_debug) {
- menu_index++;
- menu_item[menu_index] = new_item("Not Set","");
- userptr[menu_index] = 2;
- set_item_userptr(menu_item[menu_index],
- (char *)&userptr[menu_index]);
- }
+ menu_index++;
+ menu_item[menu_index] = new_item("Not Set","");
+ userptr[menu_index] = 2;
+ set_item_userptr(menu_item[menu_index],
+ (char *)&userptr[menu_index]);
menu_index++;
menu_item[menu_index] = NULL;
@@ -5102,7 +5100,7 @@
sprintf(i_con->field_data, "Optimized");
else if (*new_state == IPR_ACTIVE_NON_OPTIMIZED)
sprintf(i_con->field_data, "Non-Optimized");
- else if (ipr_debug && *new_state == IPR_ACTIVE_STANDBY)
+ else if (*new_state == IPR_ACTIVE_STANDBY)
sprintf(i_con->field_data, "Not Set");
/* only issue the command if the state selection changed */
if (acd->dev->array_rcd->saved_asym_access_state != *new_state)
@@ -5136,9 +5134,8 @@
* Returns:
* 0 if success / non-zero on failure
**/
-int configure_asym_access(i_container *i_con)
+int configure_asym_access(struct array_cmd_data *acd)
{
- struct array_cmd_data *acd;
i_container *new_i_con, *i_con_head_saved;
int header_lines = 0;
char pref_str[20];
@@ -5150,8 +5147,6 @@
i_con_head_saved = i_con_head;
i_con_head = new_i_con = NULL;
- acd = i_con->data;
-
body = body_init(n_change_array_asym_access.header, &header_lines);
sprintf(buffer, "Array: %s", acd->dev->dev_name);
body = add_line_to_body(body, buffer, NULL);
@@ -5195,11 +5190,8 @@
state = IPR_ACTIVE_OPTIMIZED;
else if (!strncmp(new_i_con->field_data, "Non-Optimized", 8))
state = IPR_ACTIVE_NON_OPTIMIZED;
- else if (ipr_debug)
- state = IPR_ACTIVE_STANDBY;
else
- /* We should never get here. */
- break;
+ state = IPR_ACTIVE_STANDBY;
acd->dev->array_rcd->issue_cmd = 1;
acd->dev->array_rcd->saved_asym_access_state = state;
@@ -5229,7 +5221,7 @@
struct screen_output *s_out;
int found = 0;
int toggle = 1;
- i_container *i_con, *temp_i_con;
+ i_container *i_con;
char *input;
int rc;
struct array_cmd_data *acd;
@@ -5240,7 +5232,7 @@
do {
n_asym_access.body = buffer[toggle&1];
/* display array selection screen */
- s_out = screen_driver(&n_asym_access, header_lines, i_con);
+ s_out = screen_driver(&n_asym_access, header_lines, NULL);
rc = s_out->rc;
free(s_out);
toggle++;
@@ -5251,9 +5243,9 @@
found = 0;
/* do one at a time */
- for_each_icon(temp_i_con) {
- acd = temp_i_con->data;
- input = temp_i_con->field_data;
+ for_each_icon(i_con) {
+ acd = i_con->data;
+ input = i_con->field_data;
if (acd && strcmp(input, "1") == 0) {
found++;
@@ -5263,7 +5255,7 @@
if (found) {
/* Go to asymmetric access selection screen */
- rc = configure_asym_access(temp_i_con);
+ rc = configure_asym_access(acd);
/* Done on success or exit */
if (rc == RC_SUCCESS || rc & EXIT_FLAG)
@@ -5275,7 +5267,6 @@
s_status.index = INVALID_OPTION_STATUS;
}
- check_current_config(false);
return rc;
}
@@ -5301,11 +5292,13 @@
/* make sure the i_con list is empty */
i_con = free_i_con(i_con);
+ check_current_config(false);
+
rc = RC_SUCCESS;
body_init_status(buffer, n_asym_access.header, &header_lines);
- for_each_ioa(ioa) {
+ for_each_primary_ioa(ioa) {
if (!ioa->asymmetric_access || !ioa->asymmetric_access_enabled)
continue;
for_each_vset(ioa, vset) {
@@ -12196,7 +12189,11 @@
if (rc)
return rc;
- return raid_start_complete();
+ rc = raid_start_complete();
+ if (rc == RC_18_Array_Created)
+ return 0;
+ else
+ return -EIO;
}
/**
@@ -15352,6 +15349,13 @@
return -EINVAL;
}
+ /* Check that the adapter is a primary adapter. */
+ if (vset->ioa->is_secondary) {
+ ioa_err(vset->ioa, "Asymmetric access commands must be issued "
+ "for arrays on the primary IOA");
+ return -EINVAL;
+ }
+
/* Check that asymmetric access is supported by the adapter. */
if (!vset->ioa->asymmetric_access) {
ioa_err(vset->ioa, "Asymmetric access is not supported.");
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/iprutils/iprconfig.h new/iprutils/iprconfig.h
--- old/iprutils/iprconfig.h 2008-10-23 18:41:38.000000000 +0200
+++ new/iprutils/iprconfig.h 2008-11-18 06:33:05.000000000 +0100
@@ -296,6 +296,11 @@
.header = {
__("There are no arrays eligible for the selected operation "
"due to one or more of the following reasons:\n\n"),
+ __("o Active/Active mode is not enabled on the IOAs.\n"),
+ __("o An IOA needs updated microcode in order to support "
+ "active/active configurations.\n"),
+ __("o None of the disk arrays in the system are capable of "
+ "changing asymmetric access attributes.\n"),
__("o There are no disk arrays in the system.\n"),
__("o An IOA is in a condition that makes the disks attached to "
"it read/write protected. Examine the kernel messages log "
@@ -304,10 +309,6 @@
"code to correct the problem, if necessary.\n"),
__("o Not all disks attached to an advanced function IOA have "
"reported to the system. Retry the operation.\n"),
- __("o None of the disk arrays in the system are capable of "
- "changing asymmetric access attributes.\n"),
- __("o An IOA needs updated microcode in order to support "
- "active/active configurations.\n"),
"" }
};
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/iprutils/iprdump.c new/iprutils/iprdump.c
--- old/iprutils/iprdump.c 2006-09-08 18:26:01.000000000 +0200
+++ new/iprutils/iprdump.c 2008-11-18 06:33:05.000000000 +0100
@@ -53,6 +53,13 @@
static char *enable = "1\n";
static char *disable = "0\n";
+/**
+ * enable_dump -
+ * @ioa: ipr_ioa struct
+ *
+ * Returns:
+ * nothing
+ **/
static void enable_dump(struct ipr_ioa *ioa)
{
struct sysfs_class_device *class_device;
@@ -92,6 +99,13 @@
sysfs_close_class_device(class_device);
}
+/**
+ * disable_dump -
+ * @ioa: ipr_ioa struct
+ *
+ * Returns:
+ * nothing
+ **/
static void disable_dump(struct ipr_ioa *ioa)
{
struct sysfs_class_device *class_device;
@@ -128,6 +142,13 @@
sysfs_close_class_device(class_device);
}
+/**
+ * read_dump -
+ * @ioa: ipr_ioa struct
+ *
+ * Returns:
+ * number of items read
+ **/
static int read_dump(struct ipr_ioa *ioa)
{
struct sysfs_class_device *class_device;
@@ -162,6 +183,13 @@
return count;
}
+/**
+ * select_dump_file -
+ * @dirent: dirent struct
+ *
+ * Returns:
+ * 1 if the string is found, else 0
+ **/
static int select_dump_file(const struct dirent *dirent)
{
if (strstr(dirent->d_name, DUMP_PREFIX))
@@ -169,6 +197,14 @@
return 0;
}
+/**
+ * dump_sort -
+ * @a: void buffer
+ * @b: void buffer
+ *
+ * Returns:
+ *
+ **/
static int dump_sort(const void *a, const void *b)
{
const struct dirent **dumpa = (const struct dirent **)a;
@@ -185,6 +221,12 @@
return alphasort(dumpa, dumpb);
}
+/**
+ * cleanup_old_dumps -
+ *
+ * Returns:
+ * Nothing
+ **/
static void cleanup_old_dumps()
{
struct dirent **dirent;
@@ -205,6 +247,13 @@
}
}
+/**
+ * get_dump_fname -
+ * @fname: file name
+ *
+ * Returns:
+ * -EIO on error, else 0
+ **/
static int get_dump_fname(char *fname)
{
struct dirent **dirent;
@@ -235,6 +284,14 @@
return 0;
}
+/**
+ * write_dump -
+ * @ioa: ipr_ioa struct
+ * @count: size to write
+ *
+ * Returns:
+ * Nothing
+ **/
static void write_dump(struct ipr_ioa *ioa, int count)
{
int f_dump;
@@ -256,6 +313,13 @@
ioa_err(ioa, "Dump of ipr IOA has completed to file: %s\n", dump_path);
}
+/**
+ * handle_signal -
+ * @signal: signal value
+ *
+ * Returns:
+ * Nothing
+ **/
static void handle_signal(int signal)
{
struct ipr_ioa *ioa;
@@ -266,6 +330,13 @@
exit(0);
}
+/**
+ * select_dump_file -
+ * @ioa: ipr_ioa struct
+ *
+ * Returns:
+ * Nothing
+ **/
static void dump_ioa(struct ipr_ioa *ioa)
{
int count;
@@ -278,6 +349,12 @@
enable_dump(ioa);
}
+/**
+ * poll_for_dump -
+ *
+ * Returns:
+ * Nothing
+ **/
static void poll_for_dump()
{
struct ipr_ioa *ioa;
@@ -290,16 +367,27 @@
dump_ioa(ioa);
}
+/**
+ * kevent_handler -
+ * @buf: character buffer
+ *
+ * Returns:
+ * Nothing
+ **/
static void kevent_handler(char *buf)
{
struct ipr_ioa *ioa;
int host, i;
+ char *index;
- if (strncmp(buf, "change@/class/scsi_host", 23))
+ if (!strncmp(buf, "change@/class/scsi_host", 23)) {
+ host = strtoul(&buf[28], NULL, 10);
+ } else if (!strncmp(buf, "change@/devices/pci", 19) && strstr(buf, "scsi_host")) {
+ index = strrchr(buf, '/');
+ host = strtoul(index + 5, NULL, 10);
+ } else
return;
- host = strtoul(&buf[28], NULL, 10);
-
for (i = 0; i < 10; i++) {
tool_init(0);
ioa = find_ioa(host);
@@ -317,6 +405,14 @@
dump_ioa(ioa);
}
+/**
+ * main -
+ * @argc: argument count
+ * @argv: argument string
+ *
+ * Returns:
+ * return value of handle_events() call
+ **/
int main(int argc, char *argv[])
{
struct ipr_ioa *ioa;
@@ -338,13 +434,15 @@
} else {
printf("Usage: "TOOL_NAME" [options]\n");
printf(" Options: --version Print iprdump version\n");
+ printf(" --daemon Run as a daemon\n");
printf(" --debug Print extra debugging information\n");
printf(" -d