updated to recent RHEL-6 package

This commit is contained in:
Dan Horák 2011-03-25 14:59:32 +01:00
parent 0b15456cd5
commit f7e20b2418
32 changed files with 26692 additions and 70 deletions

1
.gitignore vendored
View File

@ -2,3 +2,4 @@ s390-tools-1.8.2.tar.bz2
cmsfs-1.1.8c.tar.gz
lib-zfcp-hbaapi-2.0.tar.gz
src_vipa-2.0.4.tar.gz
/lib-zfcp-hbaapi-2.1.tar.gz

View File

@ -0,0 +1,41 @@
From 30321208dbccbd634c5e91b594372d150df07a03 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dan=20Hor=C3=A1k?= <dan@danny.cz>
Date: Tue, 25 Jan 2011 10:38:42 +0100
Subject: [PATCH 44/46] xcec-bridge: fix multicast forwarding
Description: xcec-bridge: fix multicast forwarding
Symptom: Forwarding of multicast traffic does not work.
Problem: xcec-bridge was developed for the broken packet socket
support of the qeth layer 3 driver. The code assumes
there are no link level heades for incoming packets.
Solution: New qeth layer 3 driver has full packet socket support
so xcec-bridge has to account link level header.
---
ip_watcher/xcec-bridge.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/ip_watcher/xcec-bridge.c b/ip_watcher/xcec-bridge.c
index d6dd112..7f551d2 100644
--- a/ip_watcher/xcec-bridge.c
+++ b/ip_watcher/xcec-bridge.c
@@ -549,12 +549,13 @@ void process_packet(struct int_sock *i_s)
if (s_ll.sll_pkttype==PACKET_BROADCAST) {
s_in.sin_addr.s_addr=INADDR_BROADCAST;
} else {
- memcpy(&s_in.sin_addr,&buffer[16],4);
+ memcpy(&s_in.sin_addr, &buffer[16 + ETH_HLEN], 4);
}
- retval=sendto(i_s_item->o_fd,buffer,buffer_len,0,
- (struct sockaddr *)&s_in,
- sizeof(struct sockaddr_in));
+ retval=sendto(i_s_item->o_fd, buffer + ETH_HLEN,
+ buffer_len - ETH_HLEN, 0,
+ (struct sockaddr *)&s_in,
+ sizeof(struct sockaddr_in));
if (retval==-1) {
if ( (errno==EMSGSIZE) && (!i_s_item->mtu_warning) ) {
syslog(LOG_WARNING,"MTU of %s too small " \
--
1.7.3.4

View File

@ -0,0 +1,53 @@
From 7ff057ee33e5e452c09308249b36fa5da051b238 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dan=20Hor=C3=A1k?= <dan@danny.cz>
Date: Tue, 25 Jan 2011 10:57:40 +0100
Subject: [PATCH 45/46] ziomon: wrong return codes
Description: ziomon: ziomon tools return 1 when using option -h, --help and -v,
when return code must be 0. ziomon return 0 when using no command line
parameter, return code must be 1 here.
Symptom: Confusing error code. Some automated test cases maybe fail.
Problem: 1 as been introduced as rc for parse_parms besides error codes,
but is not distinguished from them when parse_params is called.
Solution: In function parse_parms substitute "exit 1" by "exit 0"
in case the option -h, --help or -v was handled by the program.
Substitute "exit 0" by "exit 1" in case the case with no
commandline parametes was handled by the program.
---
ziomon/ziomon | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/ziomon/ziomon b/ziomon/ziomon
index b4c6e36..9af2f4e 100755
--- a/ziomon/ziomon
+++ b/ziomon/ziomon
@@ -124,7 +124,7 @@ function parse_params() {
if [ $# -eq 0 ]; then
print_usage;
- exit 0;
+ exit 1;
fi
let i=0;
@@ -132,7 +132,7 @@ function parse_params() {
case $1 in
--help|-h)
print_usage;
- exit 1;;
+ exit 0;;
--verbose|-V)
(( WRP_DEBUG++ ));;
--duration|-d)
@@ -152,7 +152,7 @@ function parse_params() {
[ $? -ne 0 ] && ((error++));;
--version|-v)
print_version;
- exit 1;;
+ exit 0;;
-*)
echo "$WRP_TOOLNAME: Invalid option -- $1";
echo "Try '$WRP_TOOLNAME --help' for more information.";
--
1.7.3.4

View File

@ -0,0 +1,30 @@
From 037964c1dd79a637e66b51544b69243a2f4216ea Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dan=20Hor=C3=A1k?= <dan@danny.cz>
Date: Tue, 25 Jan 2011 11:00:09 +0100
Subject: [PATCH 46/46] qethconf: process devices with non-zero subchannel
Description: qethconf: process devices with subchannel set != 0
Symptom: qethconf ipa list does not show devices with subchannel
set != 0.
Problem: The code matches only for subchannel set 0.
Solution: Extend code to match for other subchannel IDs.
---
qethconf/qethconf | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/qethconf/qethconf b/qethconf/qethconf
index 10dc902..9d9de1e 100644
--- a/qethconf/qethconf
+++ b/qethconf/qethconf
@@ -205,7 +205,7 @@ function __list_entries
fi
for j in ${cmd_type}
do
- device_list="`cat $sys_file/0.0.*/if_name`"
+ device_list="`cat $sys_file/*.*.*/if_name`"
for i in ${device_list}
do
__layer2_enabled "$i" "list"
--
1.7.3.4

View File

@ -0,0 +1,102 @@
From 68c07ef0b9d9731c040880e0db3570f48a85f9b8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dan=20Hor=C3=A1k?= <dan@danny.cz>
Date: Fri, 28 Jan 2011 13:06:00 +0100
Subject: [PATCH 47/61] wait for completion of any pending actions affecting device
Delay I/O operations until all pending requests against the common I/O layer
have been completed. The kernel now provides /proc/cio_settle file and a write
there will be blocked until all requests are completed.
---
zconf/chccwdev | 5 +++++
zconf/chchp | 5 +++++
zconf/cio_ignore | 9 +++++++++
3 files changed, 19 insertions(+), 0 deletions(-)
diff --git a/zconf/chccwdev b/zconf/chccwdev
index d2a697b..03985a1 100755
--- a/zconf/chccwdev
+++ b/zconf/chccwdev
@@ -28,6 +28,7 @@
#==============================================================================
CMD=$(basename $0)
MAX_RETRIES=5
+CIO_SETTLE="/proc/cio_settle"
if [ "$(cat /proc/filesystems|grep sysfs)" = "" ]; then
echo "ERROR: $CMD requires sysfs support!" >&2
@@ -160,6 +161,10 @@ while [ $# -gt 0 ]; do
shift
done
+if [ -w $CIO_SETTLE ] ; then
+ echo 1 > $CIO_SETTLE
+fi
+
#
# Parse the BUSIDLIST and expand the ranges and short IDs.
#
diff --git a/zconf/chchp b/zconf/chchp
index 520ce3f..4a62579 100755
--- a/zconf/chchp
+++ b/zconf/chchp
@@ -30,6 +30,7 @@ VERSION="%S390_TOOLS_VERSION%"
TOOLNAME=${0##*/}
MAX_CHPID_CSS=255
MAX_CHPID_ID=255
+CIO_SETTLE="/proc/cio_settle"
# Print help text
function print_help()
@@ -408,3 +409,7 @@ for CHPID in $CHPID_LIST ; do
get_chpid_id TO_ID $CHPID_TO
loop_chpids $FROM_CSS $FROM_ID $TO_CSS $TO_ID perform_command
done
+
+if [ -w $CIO_SETTLE ] ; then
+ echo 1 > $CIO_SETTLE
+fi
diff --git a/zconf/cio_ignore b/zconf/cio_ignore
index 71dccb1..476c481 100755
--- a/zconf/cio_ignore
+++ b/zconf/cio_ignore
@@ -8,6 +8,8 @@
VERSION="%S390_TOOLS_VERSION%"
BLACKLIST="/proc/cio_ignore"
+CIO_SETTLE="/proc/cio_settle"
+WAIT_FOR_CIO=0
SYSINFO="/proc/sysinfo"
CONSDRV="/sys/bus/ccw/drivers/3215"
MAXCSSID=0
@@ -706,9 +708,11 @@ while [ $# -gt 0 ] ; do
-r|--remove)
shift
remove_device $1
+ WAIT_FOR_CIO=1
;;
-R|--remove-all)
remove_all_devices
+ WAIT_FOR_CIO=1
;;
-l|--list)
list_blacklisted 1
@@ -724,6 +728,7 @@ while [ $# -gt 0 ] ; do
;;
-p|--purge)
purge
+ WAIT_FOR_CIO=1
;;
*)
warn "invalid option '$1'"
@@ -734,4 +739,8 @@ while [ $# -gt 0 ] ; do
shift
done
+if [ \( -w $CIO_SETTLE \) -a $WAIT_FOR_CIO = 1 ] ; then
+ echo 1 > $CIO_SETTLE
+fi
+
exit 0
--
1.7.3.5

View File

@ -0,0 +1,169 @@
From 1ce37d173f564b5070d1819d0f5cec4f015bcbdf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dan=20Hor=C3=A1k?= <dan@danny.cz>
Date: Fri, 28 Jan 2011 13:14:48 +0100
Subject: [PATCH 48/61] add infrastructure code for new features
Summary: s390-tools: Add infrastructure code for new features
Description: Add some infrastructure code from s390-tools upstream
to be used by new features:
* Add linked list implementation
* Add typedefs for replacing __uxx and __sxx datatypes
* Define S390_TOOLS_LIBDIR and S390_TOOLS_SYSCONFDIR macros
---
common.mak | 4 ++
include/list.h | 104 +++++++++++++++++++++++++++++++++++++++++++++++++++
include/zt_common.h | 11 +++++
3 files changed, 119 insertions(+), 0 deletions(-)
create mode 100644 include/list.h
diff --git a/common.mak b/common.mak
index 0a7916e..625cf6c 100644
--- a/common.mak
+++ b/common.mak
@@ -42,8 +42,12 @@ else
WARNFLAGS = -W -Wall
endif
CFLAGS = $(WARNFLAGS) -O3 -DS390_TOOLS_RELEASE=$(S390_TOOLS_RELEASE) \
+ -DS390_TOOLS_LIBDIR=$(TOOLS_LIBDIR) \
+ -DS390_TOOLS_SYSCONFDIR=$(SYSCONFDIR) \
$(OPT_FLAGS)
CXXFLAGS = $(WARNFLAGS) -O3 -DS390_TOOLS_RELEASE=$(S390_TOOLS_RELEASE) \
+ -DS390_TOOLS_LIBDIR=$(TOOLS_LIBDIR) \
+ -DS390_TOOLS_SYSCONFDIR=$(SYSCONFDIR) \
$(OPT_FLAGS)
export AS LD CC CPP AR NM STRIP OBJCOPY OBJDUMP INSTALL CFLAGS
diff --git a/include/list.h b/include/list.h
new file mode 100644
index 0000000..b7344ed
--- /dev/null
+++ b/include/list.h
@@ -0,0 +1,104 @@
+/*
+ * Linked list functions
+ *
+ * Copyright IBM Corp. 2001, 2010
+ * Author(s): Carsten Otte (cotte@de.ibm.com)
+ * Michael Holzheu <holzheu@linux.vnet.ibm.com>
+ */
+
+#ifndef LIST_H
+#define LIST_H
+
+#include <stddef.h>
+
+struct list {
+ struct list *next, *prev;
+};
+
+#define EMPTY_LIST(list) { &(list), &(list) }
+
+/*
+ * Add entry to begining of list
+ */
+static inline void list_add(struct list *entry, struct list *head)
+{
+ entry->next = head->next;
+ entry->next->prev = entry;
+ head->next = entry;
+ entry->prev = head;
+}
+
+/*
+ * Add entry to end of list
+ */
+static inline void list_add_end(struct list *entry, struct list *head)
+{
+ entry->prev = head->prev;
+ entry->prev->next = entry;
+ head->prev = entry;
+ entry->next = head;
+}
+
+/*
+ * Remove entry
+ */
+static inline void list_del(struct list *entry)
+{
+ entry->next->prev = entry->prev;
+ entry->prev->next = entry->next;
+ entry->next = entry;
+ entry->prev = entry;
+}
+
+/*
+ * Check if list is empty
+ */
+static inline int list_is_empty(struct list *head)
+{
+ if ((head->next == head) && (head->prev == head))
+ return 1;
+ else
+ return 0;
+}
+
+/*
+ * Initialize list
+ */
+static inline void list_init(struct list *head)
+{
+ head->next = head;
+ head->prev = head;
+}
+
+#define list_entry(ptr, type, member) ({ \
+ const typeof(((type *) 0)->member) *__member_ptr = (ptr); \
+ (type *)((char *)__member_ptr - offsetof(type, member) ); })
+
+#define list_entry_first(ptr, type, member) \
+ list_entry((ptr)->next, type, member)
+
+#define list_entry_next(ptr, type, member) \
+ list_entry((ptr)->next, type, member)
+
+#define list_entry_prev(ptr, type, member) \
+ list_entry((ptr)->prev, type, member)
+
+/*
+ * List iterators
+ */
+#define list_get(entry, type, member) \
+ ((type *)((char *)(entry)-(unsigned long)(&((type *)0)->member)))
+
+#define list_iterate(i, head, member) \
+ for (i = list_get((head)->next, typeof(*i), member); \
+ &i->member != (head); \
+ i = list_get(i->member.next, typeof(*i), member))
+
+#define list_iterate_safe(i, head, member, n) \
+ for (i = list_get((head)->next, typeof(*i), member), \
+ n = list_get(i->member.next, typeof(*i), member); \
+ &i->member != (head); \
+ i = n, \
+ n = list_get(n->member.next, typeof(*n), member))
+
+#endif /* LIST_H */
diff --git a/include/zt_common.h b/include/zt_common.h
index ba9a850..7950651 100644
--- a/include/zt_common.h
+++ b/include/zt_common.h
@@ -21,5 +21,16 @@
#endif
#define RELEASE_STRING STRINGIFY (S390_TOOLS_RELEASE)
+#define TOOLS_LIBDIR STRINGIFY (S390_TOOLS_LIBDIR)
+#define TOOLS_SYSCONFDIR STRINGIFY (S390_TOOLS_SYSCONFDIR)
+
+typedef unsigned long long u64;
+typedef signed long long s64;
+typedef unsigned int u32;
+typedef signed int s32;
+typedef unsigned short int u16;
+typedef signed short int s16;
+typedef unsigned char u8;
+typedef signed char s8;
#endif /* ZT_COMMON_H */
--
1.7.3.5

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,729 @@
From 411a47d37b69a0763d1d7b1e3e132cfab67815cd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dan=20Hor=C3=A1k?= <dan@danny.cz>
Date: Fri, 28 Jan 2011 14:15:39 +0100
Subject: [PATCH 51/61] lsmem/chmem: Tools to manage memory hotplug
Summary: lsmem/chmem: Tools to manage memory hotplug.
Description: With lsmem, you can display the online status of all available
memory. With chmem, you can set memory online or offline.
---
README | 2 +
zconf/Makefile | 17 +++-
zconf/chmem | 325 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
zconf/chmem.8 | 71 ++++++++++++
zconf/lsmem | 158 +++++++++++++++++++++++++++
zconf/lsmem.8 | 69 ++++++++++++
6 files changed, 639 insertions(+), 3 deletions(-)
create mode 100644 zconf/chmem
create mode 100644 zconf/chmem.8
create mode 100644 zconf/lsmem
create mode 100644 zconf/lsmem.8
diff --git a/README b/README
index 4335b43..dbb1475 100644
--- a/README
+++ b/README
@@ -112,6 +112,8 @@ s390-tools (1.8.2)
adapters.
- cio_ignore: Query and modify the contents of the CIO device driver
blacklist.
+ - lsmem: Display the online status of the available memory.
+ - chmem: Set hotplug memory online or offline.
* dumpconf:
Allows to configure the dump device used for system dump in case a kernel
diff --git a/zconf/Makefile b/zconf/Makefile
index 9fe8b42..10f2b87 100644
--- a/zconf/Makefile
+++ b/zconf/Makefile
@@ -5,14 +5,16 @@ include ../common.mak
SCRIPTS = lsdasd lstape lscss chccwdev lsqeth lszfcp lschp chchp lszcrypt \
chzcrypt lsluns cio_ignore znetconf
+USRSBIN_SCRIPTS = lsmem chmem
MANPAGES= lsdasd.8 lstape.8 lscss.8 chccwdev.8 lsqeth.8 lszfcp.8 lschp.8 \
- chchp.8 lszcrypt.8 chzcrypt.8 lsluns.8 cio_ignore.8 znetconf.8
+ chchp.8 lszcrypt.8 chzcrypt.8 lsluns.8 cio_ignore.8 znetconf.8 \
+ chmem.8 lsmem.8
all:
clean:
-install: install-scripts install-manpages
+install: install-scripts install-manpages install-usrsbin-scripts
$(INSTALL) -g $(GROUP) -o $(OWNER) -m 755 lsznet.raw $(TOOLS_LIBDIR)
$(INSTALL) -g $(GROUP) -o $(OWNER) -m 755 znetcontrolunits \
$(TOOLS_LIBDIR)
@@ -26,6 +28,15 @@ install-scripts: $(SCRIPTS)
chmod 755 $(BINDIR)/$$i; \
done
+install-usrsbin-scripts: $(USRSBIN_SCRIPTS)
+ @for i in $^; do \
+ cat $$i | \
+ sed -e 's+%S390_TOOLS_VERSION%+$(S390_TOOLS_RELEASE)+' \
+ >$(USRSBINDIR)/$$i; \
+ chown $(OWNER).$(GROUP) $(USRSBINDIR)/$$i; \
+ chmod 755 $(USRSBINDIR)/$$i; \
+ done
+
install-manpages: $(MANPAGES)
@if [ ! -d $(MANDIR) ]; then \
mkdir -p $(MANDIR)/man8; \
@@ -38,4 +49,4 @@ install-manpages: $(MANPAGES)
install -o $(OWNER) -g $(GROUP) -m 644 $$i $(MANDIR)/man8; \
done
-.PHONY: all install clean install-scripts install-manpages
+.PHONY: all install clean install-scripts install-manpages install-usrsbin-scripts
diff --git a/zconf/chmem b/zconf/chmem
new file mode 100644
index 0000000..bdc25a4
--- /dev/null
+++ b/zconf/chmem
@@ -0,0 +1,325 @@
+#!/usr/bin/perl
+###############################################################################
+# chmem - script to show memory hotplug status.
+#
+# Copyright IBM Corp. 2010
+# Author(s): Gerald Schaefer <gerald.schaefer@de.ibm.com>
+###############################################################################
+
+use strict;
+use warnings;
+use Getopt::Long qw(:config no_ignore_case no_auto_abbrev);
+use File::Basename;
+
+my $script_name = fileparse($0);
+my $online = 0;
+my $offline = 0;
+my $memdir = "/sys/devices/system/memory";
+my $block_size = 0;
+my $total_blocks = 0;
+my $devices = {};
+my $dev_size;
+my $blocks_per_dev = 0;
+my $devs_per_block = 0;
+my $ret = 0;
+
+sub chmem_usage()
+{
+ print <<HERE;
+Usage: $script_name [OPTIONS] SIZE|RANGE
+
+The $script_name command sets a particular size or range of memory online
+or offline.
+
+Specify SIZE as <size>[m|M|g|G]. With m or M, <size> specifies the memory
+size in MB (1024 x 1024 bytes). With g or G, <size> specifies the memory size
+in GB (1024 x 1024 x 1024 bytes). The default unit is MB.
+
+Specify RANGE in the form 0x<start>-0x<end> as shown in the output of the
+lsmem command. <start> is the hexadecimal address of the first byte and <end>
+is the hexadecimal address of the last byte in the memory range.
+
+SIZE and RANGE must be aligned to the Linux memory block size, as shown in
+the output of the lsmem command.
+
+OPTIONS
+ -e, --enable
+ Set the given RANGE or SIZE of memory online.
+
+ -d, --disable
+ Set the given RANGE or SIZE of memory offline.
+
+ -h, --help
+ Print a short help text, then exit.
+
+ -v, --version
+ Print the version number, then exit.
+HERE
+}
+
+sub chmem_version()
+{
+ print "$script_name: version %S390_TOOLS_VERSION%\n";
+ print "Copyright IBM Corp. 2010\n";
+}
+
+sub chmem_get_dev_size()
+{
+ my $i = 0;
+ my $device = 0;
+ my $old_device = 0;
+
+ while (-d "$memdir/memory$i") {
+ $device = `cat $memdir/memory$i/phys_device`;
+ chomp($device);
+ if ($device > $old_device) {
+ $dev_size = int($dev_size / ($device - $old_device));
+ last;
+ }
+ $dev_size += $block_size;
+ $i++;
+ }
+}
+
+sub chmem_online($)
+{
+ my $block = shift;
+
+ qx(echo online > $memdir/memory$block/state 2>/dev/null);
+ return $? >> 8;
+}
+
+sub chmem_offline($)
+{
+ my $block = shift;
+
+ qx(echo offline > $memdir/memory$block/state 2>/dev/null);
+ return $? >> 8;;
+}
+
+sub chmem_read_attr($$$)
+# parameters: state, device, block
+{
+ my @attributes = qw(state phys_device);
+ foreach (0..1) {
+ $_[$_] = `cat $memdir/memory$_[2]/$attributes[$_]`;
+ chomp($_[$_]);
+ }
+}
+
+sub chmem_read_devices()
+{
+ my $i = 0;
+ my $device = 0;
+ my $old_device = 0;
+ my $blocks = 0;
+ my $state;
+
+ while (-d "$memdir/memory$i") {
+ chmem_read_attr($state, $device, $i);
+ if ($device != $old_device) {
+ $devices->{$old_device}->{'id'} = $old_device;
+ $devices->{$old_device}->{'blocks'} = $blocks;
+ $old_device = $device;
+ $blocks = 0;
+ }
+ if ($state eq "online") {
+ $blocks++;
+ }
+ $i++;
+ }
+ $devices->{$old_device}->{'blocks'} = $blocks;
+ $devices->{$old_device}->{'id'} = $old_device;
+}
+
+sub chmem_dev_action($$)
+{
+ my ($dev_id, $blocks) = @_;
+ my ($start_block, $end_block, $tmp_block, $max_blocks);
+ my $state;
+ my $i = 0;
+ my $count = 0;
+
+ if ($blocks_per_dev > 0) {
+ $start_block = $dev_id * $blocks_per_dev;
+ $end_block = $start_block + $blocks_per_dev - 1;
+ $max_blocks = $blocks_per_dev;
+ } else {
+ $start_block = int($dev_id / $devs_per_block);
+ $end_block = $start_block;
+ $max_blocks = 1;
+ }
+ if ($blocks > $max_blocks) {
+ $blocks = $max_blocks;
+ }
+ while ($count < $blocks && $i < $max_blocks) {
+ $tmp_block = $online ? $start_block + $i : $end_block - $i;
+ $state = `cat $memdir/memory$tmp_block/state`;
+ chomp($state);
+ if ($offline && $state eq "online") {
+ $count++ unless chmem_offline($tmp_block);
+ }
+ if ($online && $state eq "offline") {
+ $count++ unless chmem_online($tmp_block);
+ }
+ $i++;
+ }
+ return $count;
+}
+
+sub chmem_size($)
+{
+ my $size = shift;
+ my ($blocks, $dev_blocks, $dev_id);
+
+ $blocks = int($size / $block_size);
+ if ($online) {
+ foreach my $device (sort {$b->{'blocks'} <=> $a->{'blocks'} ||
+ $a->{'id'} <=> $b->{'id'}}
+ values %{$devices}) {
+ $dev_blocks = $device->{'blocks'};
+ $dev_id = $device->{'id'};
+ if ($dev_blocks < $blocks_per_dev || $dev_blocks == 0) {
+ $blocks -= chmem_dev_action($dev_id, $blocks);
+ if ($blocks == 0) {
+ last;
+ }
+ }
+ }
+ if ($blocks > 0) {
+ printf(STDERR "chmem: Could only set %lu MB of memory ".
+ "online.\n", $size - $blocks * $block_size);
+ $ret = 1;
+ }
+ } else {
+ foreach my $device (sort {$a->{'blocks'} <=> $b->{'blocks'} ||
+ $b->{'id'} <=> $a->{'id'}}
+ values %{$devices}) {
+ $dev_blocks = $device->{'blocks'};
+ $dev_id = $device->{'id'};
+ if ($dev_blocks > 0) {
+ $blocks -= chmem_dev_action($dev_id, $blocks);
+ if ($blocks == 0) {
+ last;
+ }
+ }
+ }
+ if ($blocks > 0) {
+ printf(STDERR "chmem: Could only set %lu MB of memory ".
+ "offline.\n", $size - $blocks * $block_size);
+ $ret = 1;
+ }
+ }
+}
+
+sub chmem_range($$)
+{
+ my ($start, $end) = @_;
+ my $block = 0;
+ my $state;
+
+ while ($start < $end && $block < $total_blocks - 1) {
+ $block = int($start / ($block_size << 20));
+ $state = `cat $memdir/memory$block/state`;
+ chomp($state);
+ if ($online && $state eq "offline") {
+ if (chmem_online($block)) {
+ printf(STDERR "chmem: Could not set ".
+ "0x%016x-0x%016x online\n", $start,
+ $start + ($block_size << 20) - 1);
+ $ret = 1;
+ }
+ }
+ if ($offline && $state eq "online") {
+ if (chmem_offline($block)) {
+ printf(STDERR "chmem: Could not set ".
+ "0x%016x-0x%016x offline\n", $start,
+ $start + ($block_size << 20) - 1);
+ $ret = 1;
+ }
+ }
+ $start += $block_size << 20;
+ }
+}
+
+sub chmem_check()
+{
+ unless (-d $memdir) {
+ die "chmem: No memory hotplug interface in sysfs ($memdir).\n";
+ }
+ $block_size = `cat $memdir/block_size_bytes`;
+ chomp($block_size);
+ if ($block_size =~ /(?:0x)?([[:xdigit:]]+)/) {
+ $block_size = unpack("Q", pack("H16",
+ substr("0" x 16 . $1, -16)));
+ $block_size = $block_size >> 20;
+ } else {
+ die "chmem: Unknown block size format in sysfs.\n";
+ }
+ if ($online == 0 && $offline == 0) {
+ die "chmem: Please specify one of the options -e or -d.\n";
+ }
+ if ($online == 1 && $offline == 1) {
+ die "chmem: You cannot specify both options -e and -d.\n";
+ }
+
+ while (-d "$memdir/memory$total_blocks") {
+ $total_blocks++;
+ }
+ chmem_get_dev_size();
+ if ($dev_size >= $block_size) {
+ $blocks_per_dev = int($dev_size / $block_size);
+ } else {
+ $devs_per_block = int($block_size / $dev_size);
+ }
+}
+
+sub chmem_action()
+{
+ my ($start, $end, $size, $unit);
+
+ if (!defined($ARGV[0])) {
+ die "chmem: Missing size or range.\n";
+ }
+ if ($ARGV[0] =~ /^0x([[:xdigit:]]+)-0x([[:xdigit:]]+)$/) {
+ $start = unpack("Q", pack("H16", substr("0" x 16 . $1, -16)));
+ $end = unpack("Q", pack("H16", substr("0" x 16 . $2, -16)));
+ if ($start % ($block_size << 20) ||
+ ($end + 1) % ($block_size << 20)) {
+ die "chmem: Start address and (end address + 1) must ".
+ "be aligned to memory block size ($block_size MB).\n";
+ }
+ chmem_range($start, $end);
+ } else {
+ if ($ARGV[0] =~ m/^(\d+)([mg]?)$/i) {
+ $size = $1;
+ $unit = $2 || "";
+ if ($unit =~ /g/i) {
+ $size = $size << 10;
+ }
+ if ($size % $block_size) {
+ die "chmem: Size must be aligned to memory ".
+ "block size ($block_size MB).\n";
+ }
+ chmem_size($size);
+ } else {
+ printf(STDERR "chmem: Invalid size or range: %s\n",
+ $ARGV[0]);
+ exit 1;
+ }
+ }
+}
+
+
+# Main
+unless (GetOptions('v|version' => sub {chmem_version(); exit 0;},
+ 'h|help' => sub {chmem_usage(); exit 0;},
+ 'e|enable' => \$online,
+ 'd|disable' => \$offline)) {
+ die "Try '$script_name --help' for more information.\n";
+};
+
+chmem_read_devices();
+chmem_check();
+chmem_action();
+exit $ret;
diff --git a/zconf/chmem.8 b/zconf/chmem.8
new file mode 100644
index 0000000..34bea3c
--- /dev/null
+++ b/zconf/chmem.8
@@ -0,0 +1,71 @@
+.TH CHMEM 8 "Apr 2010" "s390-tools"
+.
+.
+.SH NAME
+chmem \- set memory online or offline.
+.
+.SH SYNOPSIS
+.B chmem
+.RB OPTIONS
+.RB [SIZE|RANGE]
+.
+.
+.SH DESCRIPTION
+The chmem command sets a particular size or range of memory online or offline.
+.
+.IP "\(hy" 2
+Specify SIZE as <size>[m|M|g|G]. With m or M, <size> specifies the memory
+size in MB (1024 x 1024 bytes). With g or G, <size> specifies the memory size
+in GB (1024 x 1024 x 1024 bytes). The default unit is MB.
+.
+.IP "\(hy" 2
+Specify RANGE in the form 0x<start>-0x<end> as shown in the output of the
+lsmem command. <start> is the hexadecimal address of the first byte and <end>
+is the hexadecimal address of the last byte in the memory range.
+.
+.PP
+SIZE and RANGE must be aligned to the Linux memory block size, as shown in
+the output of the lsmem command.
+
+Setting memory online can fail if the hypervisor does not have enough memory
+left, for example because memory was overcommitted. Setting memory offline can
+fail if Linux cannot free the memory. If only part of the requested memory can
+be set online or offline, a message tells you how much memory was set online
+or offline instead of the requested amount.
+.
+.
+.SH OPTIONS
+.TP
+.BR \-h ", " \-\-help
+Print a short help text, then exit.
+.
+.TP
+.BR \-v ", " \-\-version
+Print the version number, then exit.
+.
+.TP
+.BR \-e ", " \-\-enable
+Set the given RANGE or SIZE of memory online.
+.
+.TP
+.BR \-d ", " \-\-disable
+Set the given RANGE or SIZE of memory offline.
+.
+.
+.SH EXAMPLES
+.TP
+.B chmem --enable 1024
+This command requests 1024 MB of memory to be set online.
+.
+.TP
+.B chmem -e 2g
+This command requests 2 GB of memory to be set online.
+.
+.TP
+.B chmem --disable 0x00000000e4000000-0x00000000f3ffffff
+This command requests the memory range starting with 0x00000000e4000000
+and ending with 0x00000000f3ffffff to be set offline.
+.
+.
+.SH SEE ALSO
+.BR lsmem (8)
diff --git a/zconf/lsmem b/zconf/lsmem
new file mode 100644
index 0000000..e6ed1fa
--- /dev/null
+++ b/zconf/lsmem
@@ -0,0 +1,158 @@
+#!/usr/bin/perl
+###############################################################################
+# lsmem - script to show memory hotplug status.
+#
+# Copyright IBM Corp. 2010
+# Author(s): Gerald Schaefer <gerald.schaefer@de.ibm.com>
+###############################################################################
+
+use strict;
+use warnings;
+use Getopt::Long qw(:config no_ignore_case no_auto_abbrev);
+use File::Basename;
+
+my $script_name = fileparse($0);
+my $memdir = "/sys/devices/system/memory";
+my $block_size = 0;
+my $list_all = 0;
+my $dev_size = 0;
+
+
+sub lsmem_read_attr($$$$)
+# parameters: state, rem, device, block_nr
+{
+ my @attributes = qw(state removable phys_device);
+ foreach (0..2) {
+ $_[$_] = `cat $memdir/memory$_[3]/$attributes[$_]`;
+ chomp($_[$_]);
+ }
+}
+
+sub lsmem_get_dev_size()
+{
+ my $i = 0;
+ my ($device, $old_device) = (0, 0);
+
+ while (-d "$memdir/memory$i") {
+ $device = `cat $memdir/memory$i/phys_device`;
+ chomp($device);
+ if ($device > $old_device) {
+ $dev_size = int($dev_size / ($device - $old_device));
+ last;
+ }
+ $dev_size += $block_size;
+ $i++;
+ }
+}
+
+sub lsmem_list()
+{
+ my $i = 0;
+ my ($start, $end, $size) = (0, 0, 0);
+ my ($state, $old_state) = (0, 0);
+ my ($rem, $old_rem) = (0, 0);
+ my ($device, $old_device) = (0, 0);
+ my ($mem_online, $mem_offline) = (0, 0);
+ my ($last_block, $end_dev) = (0, 0);
+
+ if (-d "$memdir/memory0") {
+ lsmem_read_attr($old_state, $old_rem, $old_device, 0);
+ } else {
+ die "lsmem: No memory hotplug interface in sysfs ($memdir).\n";
+ }
+
+ $block_size = `cat $memdir/block_size_bytes`;
+ chomp($block_size);
+ if ($block_size =~ /(?:0x)?([[:xdigit:]]+)/) {
+ $block_size = unpack("Q", pack("H16",
+ substr("0" x 16 . $1, -16)));
+ $block_size = $block_size >> 20;
+ } else {
+ die "lsmem: Unknown block size format in sysfs.\n";
+ }
+ lsmem_get_dev_size();
+
+ print <<HERE;
+Address Range Size (MB) State Removable Device
+===============================================================================
+HERE
+ while (-d "$memdir/memory$i") {
+ $i++;
+ if (-d "$memdir/memory$i") {
+ lsmem_read_attr($state, $rem, $device, $i);
+ } else {
+ $last_block = 1;
+ }
+ if ($state ne $old_state || $rem != $old_rem || $list_all ||
+ $last_block) {
+ $end = $i * ($block_size << 20) - 1;
+ $size = ($end - $start + 1) >> 20;
+ if ($old_state eq "going-offline") {
+ $old_state = "on->off";
+ }
+ printf("0x%016x-0x%016x %10lu %-7s ", $start, $end,
+ $size, $old_state);
+ if ($old_state eq "online") {
+ printf(" %-9s ", $old_rem ? "yes" : "no");
+ $mem_online += $size;
+ } else {
+ printf(" %-9s ", "-");
+ $mem_offline += $size;
+ }
+ $end_dev = ($end / $dev_size) >> 20;
+ if ($old_device == $end_dev) {
+ printf("%d\n", $old_device);
+ } else {
+ printf("%d-%d\n", $old_device, $end_dev);
+ }
+ $old_state = $state;
+ $old_rem = $rem;
+ $old_device = $device;
+ $start = $end + 1;
+ }
+ }
+ printf("\n");
+ printf("Memory device size : %lu MB\n", $dev_size);
+ printf("Memory block size : %lu MB\n", $block_size);
+ printf("Total online memory : %lu MB\n", $mem_online);
+ printf("Total offline memory: %lu MB\n", $mem_offline);
+}
+
+sub lsmem_usage()
+{
+ print <<HERE;
+Usage: $script_name [OPTIONS]
+
+The $script_name command lists the ranges of available memory with their online
+status. The listed memory blocks correspond to the memory block representation
+in sysfs. The command also shows the memory block size, the device size, and
+the amount of memory in online and offline state.
+
+OPTIONS
+ -a, --all
+ List each individual memory block, instead of combining memory blocks
+ with similar attributes.
+
+ -h, --help
+ Print a short help text, then exit.
+
+ -v, --version
+ Print the version number, then exit.
+HERE
+}
+
+sub lsmem_version()
+{
+ print "$script_name: version %S390_TOOLS_VERSION%\n";
+ print "Copyright IBM Corp. 2010\n";
+}
+
+
+# Main
+unless (GetOptions('v|version' => sub {lsmem_version(); exit 0;},
+ 'h|help' => sub {lsmem_usage(); exit 0;},
+ 'a|all' => \$list_all)) {
+ die "Try '$script_name --help' for more information.\n";
+};
+
+lsmem_list();
diff --git a/zconf/lsmem.8 b/zconf/lsmem.8
new file mode 100644
index 0000000..ed052ea
--- /dev/null
+++ b/zconf/lsmem.8
@@ -0,0 +1,69 @@
+.TH LSMEM 8 "Apr 2010" s390\-tools
+.
+.
+.SH NAME
+lsmem \- list the ranges of available memory with their online status.
+.
+.
+.SH SYNOPSIS
+.B lsmem
+.RB [OPTIONS]
+.
+.
+.SH DESCRIPTION
+The lsmem command lists the ranges of available memory with their online
+status. The listed memory blocks correspond to the memory block representation
+in sysfs. The command also shows the memory block size, the device size, and
+the amount of memory in online and offline state.
+.
+.SS "Column description"
+.
+.TP 4
+Address Range
+Start and end address of the memory range.
+.
+.TP 4
+Size
+Size of the memory range in MB (1024 x 1024 bytes).
+.
+.TP 4
+State
+Indication of the online status of the memory range. State on->off means
+that the address range is in transition from online to offline.
+.
+.TP 4
+Removable
+"yes" if the memory range can be set offline, "no" if it cannot be set offline.
+A dash ("\-") means that the range is already offline.
+.
+.TP 4
+Device
+Device number or numbers that correspond to the memory range.
+
+Each device represents a memory unit for the hypervisor in control of the
+memory. The hypervisor cannot reuse a memory unit unless the corresponding
+memory range is completely offline. For best memory utilization, each device
+should either be completely online or completely offline.
+
+The chmem command with the size parameter automatically chooses the best suited
+device or devices when setting memory online or offline. The device size depends
+on the hypervisor and on the amount of total online and offline memory.
+.
+.
+.SH OPTIONS
+.TP
+.BR \-a ", " \-\-all
+List each individual memory block, instead of combining memory blocks with
+similar attributes.
+.
+.TP
+.BR \-h ", " \-\-help
+Print a short help text, then exit.
+.
+.TP
+.BR \-v ", " \-\-version
+Print the version number, then exit.
+.
+.
+.SH SEE ALSO
+.BR chmem (8)
--
1.7.3.5

View File

@ -0,0 +1,562 @@
From 9d93b66b6eda5f3dbaf6804663af21927c3aab8f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dan=20Hor=C3=A1k?= <dan@danny.cz>
Date: Fri, 28 Jan 2011 14:17:36 +0100
Subject: [PATCH 52/61] dumpconf: Prevent re-IPL loop for dump on panic
Summary: dumpconf: Prevent re-IPL loop for dump on panic.
Description: A new keyword DELAY_MINUTES is introduced in the dumpconf.
configuration file. Using this keyword the activation of dumpconf
can be delayed in order to prevent potential re-IPL loops.
---
etc/init.d/dumpconf | 271 ++++++++++++++++++++++++++++++++++--------------
etc/sysconfig/dumpconf | 10 ++-
2 files changed, 202 insertions(+), 79 deletions(-)
diff --git a/etc/init.d/dumpconf b/etc/init.d/dumpconf
index 1dd898d..27f52e4 100755
--- a/etc/init.d/dumpconf
+++ b/etc/init.d/dumpconf
@@ -15,25 +15,48 @@
# chkconfig: 0123456 01 99
DUMP_CONFIG_FILE=/etc/sysconfig/dumpconf
+CMDFULL=$0
+CMD="dumpconf"
+LOCKFILE=/var/lock/subsys/$CMD
+PIDFILE=/var/run/$CMD.pid
ERRMSG="Check $DUMP_CONFIG_FILE!"
RETVAL=0
+BACKGROUND=0
+
+pr_info()
+{
+ if [ $BACKGROUND -eq 0 ]; then
+ echo "$@"
+ else
+ echo "$@" | logger -t dumpconf
+ fi
+}
+
+pr_error()
+{
+ if [ $BACKGROUND -eq 0 ]; then
+ echo "$@" >&2
+ else
+ echo "$@" | logger -t dumpconf
+ fi
+}
check_environment()
{
if [ ! -f $DUMP_CONFIG_FILE ]; then
- echo "no config file found: $DUMP_CONFIG_FILE"
+ pr_error "no config file found: $DUMP_CONFIG_FILE"
exit 1
fi
if [ "$(cat /proc/filesystems|grep sysfs)" = "" ]; then
- echo "no sysfs found" >&2
+ pr_error "no sysfs found"
exit 1
fi
SYSFSDIR=$(cat /proc/mounts|awk '$3=="sysfs"{print $2; exit}')
if [ "$SYSFSDIR" = "" ]; then
- echo "sysfs not mounted" >&2
+ pr_error "sysfs not mounted"
exit 1
fi
@@ -41,12 +64,12 @@ check_environment()
ON_PANIC_CONFIG_FILE=/$SYSFSDIR/firmware/shutdown_act\
ions/on_panic
if [ ! -d $DUMP_CONFIG_DIR ]; then
- echo "kernel has no dump on panic support"
+ pr_info "kernel has no dump on panic support"
exit 0
fi
REIPL_CONFIG_DIR=/$SYSFSDIR/firmware/reipl
if [ ! -d $REIPL_CONFIG_DIR ]; then
- echo "kernel has no dump on panic support"
+ pr_info "kernel has no dump on panic support"
exit 0
fi
VMCMD_CONFIG_DIR=/$SYSFSDIR/firmware/vmcmd
@@ -90,6 +113,43 @@ Try 'dumpconf --help' for more information.
EOF
}
+cleanup_pidfile()
+{
+ if [ $(ps $1 | grep $CMD | wc -l) -eq 0 ]; then
+ rm -f $PIDFILE
+ fi
+}
+
+handle_stop_request()
+{
+ rm -f $PIDFILE 2>/dev/null
+ exit 0
+}
+
+delay_activation()
+{
+ # Open lock file with file descriptor 123
+ exec 123>$LOCKFILE
+ if flock -n -x 123; then
+ if [ -f $PIDFILE ]; then
+ # concurrent process was faster
+ exit 0
+ fi
+ trap handle_stop_request TERM
+ echo $$ > $PIDFILE
+ else
+ # Nothing to do, "dumpconf start" is already in progress
+ exit 0
+ fi
+ # Close file descriptor 123
+ exec 123>&-
+ # Do multiple sleeps in order to be interruptible
+ for ((i=0; i < $DELAY_MINUTES * 60; i++)); do
+ sleep 1
+ done
+ rm -f $PIDFILE
+}
+
# $1: dump device bus id (e.g. 0.0.4711)
verify_ccw_dump_device()
{
@@ -98,7 +158,7 @@ verify_ccw_dump_device()
line=$(lsdasd $1)
fi
if [ "$line" == "" ]; then
- echo "WARNING: device $1 not found!"
+ pr_info "WARNING: device $1 not found!"
return 1
fi
found=false
@@ -115,7 +175,7 @@ verify_ccw_dump_device()
if [ $? == 0 ]; then
return 0
else
- echo "WARNING: $1 is no valid dump device!"
+ pr_info "WARNING: $1 is no valid dump device!"
return 1
fi
}
@@ -166,28 +226,28 @@ setup_device()
echo $DEV > $1/$2/device
else
RETVAL=1
- echo "ERROR: Invalid DEVICE '$DEVICE'." $ERRMSG >&2
+ pr_error "ERROR: Invalid DEVICE '$DEVICE'." $ERRMSG
return
fi
if [ $2 == "fcp" ]; then
echo $WWPN > $1/fcp/wwpn 2>/dev/null || RETVAL=1
if [ $RETVAL -eq 1 ]; then
- echo "ERROR: Invalid WWPN '$WWPN'." $ERRMSG >&2
+ pr_error "ERROR: Invalid WWPN '$WWPN'." $ERRMSG
return
fi
echo $LUN > $1/fcp/lun 2>/dev/null || RETVAL=1
if [ $RETVAL -eq 1 ]; then
- echo "ERROR: Invalid LUN '$LUN'." $ERRMSG >&2
+ pr_error "ERROR: Invalid LUN '$LUN'." $ERRMSG
return
fi
echo $BOOTPROG > $1/fcp/bootprog 2>/dev/null || RETVAL=1
if [ $RETVAL -eq 1 ]; then
- echo "ERROR: Invalid BOOTPROG '$BOOTPROG'." $ERRMSG >&2
+ pr_error "ERROR: Invalid BOOTPROG '$BOOTPROG'." $ERRMSG
return
fi
echo $BR_LBA > $1/fcp/br_lba 2>/dev/null || RETVAL=1
if [ $RETVAL -eq 1 ]; then
- echo "ERROR: Invalid BR_LBA '$BR_LBA'." $ERRMSG >&2
+ pr_error "ERROR: Invalid BR_LBA '$BR_LBA'." $ERRMSG
return
fi
fi
@@ -201,7 +261,7 @@ setup_nss_device()
setup_reipl()
{
if [ "$REIPL_TYPE" == "" ]; then
- echo "reipl on panic configured: Using default reipl values."
+ pr_info "reipl on panic configured: Using default reipl values."
return
fi
@@ -210,7 +270,7 @@ setup_reipl()
elif [ "$REIPL_TYPE" == "nss" ]; then
setup_nss_device $REIPL_CONFIG_DIR
else
- echo "ERROR: Unknown reipl type '$REIPL_TYPE'." $ERRMSG >&2
+ pr_error "ERROR: Unknown reipl type '$REIPL_TYPE'." $ERRMSG
RETVAL=1
return
fi
@@ -221,7 +281,7 @@ setup_reipl()
return
fi
- echo "$REIPL_TYPE reipl device configured."
+ pr_info "$REIPL_TYPE reipl device configured."
}
setup_dump()
@@ -229,7 +289,7 @@ setup_dump()
if [ "$DUMP_TYPE" == "ccw" ] || [ "$DUMP_TYPE" == "fcp" ]; then
setup_device $DUMP_CONFIG_DIR $DUMP_TYPE
elif [ "$DUMP_TYPE" != "none" ]; then
- echo "ERROR: Unknown dump type '$DUMP_TYPE'." $ERRMSG >&2
+ pr_error "ERROR: Unknown dump type '$DUMP_TYPE'." $ERRMSG
RETVAL=1
return
fi
@@ -241,7 +301,7 @@ setup_dump()
return
fi
- echo "$ON_PANIC on panic configured: Using $DUMP_TYPE dump device."
+ pr_info "$ON_PANIC on panic configured: Using $DUMP_TYPE dump device."
}
setup_on_panic_vmcmd()
@@ -257,69 +317,69 @@ setup_on_panic_vmcmd()
fi
done
if [ ! -d $VMCMD_CONFIG_DIR ]; then
- echo "ERROR: No vmcmd support. Are you running on LPAR?" >&2
+ pr_error "ERROR: No vmcmd support. Are you running on LPAR?"
RETVAL=1
elif [ "$VMCMD" == "" ]; then
- echo "ERROR: No VMCMD_x keyword specified." $ERRMSG >&2
+ pr_error "ERROR: No VMCMD_x keyword specified." $ERRMSG
RETVAL=1
else
echo -en "$VMCMD" | cat > $VMCMD_CONFIG_DIR/on_panic || RETVAL=1
fi
if [ $RETVAL -eq 0 ]; then
- echo "vmcmd on panic configured:"
- echo -e "$VMCMD"
+ pr_info "vmcmd on panic configured:"
+ pr_info -e "$VMCMD"
fi
}
print_fcp_device()
{
DEVICE=$(cat $1/fcp/device) || RETVAL=1
- echo "device..: $DEVICE"
+ pr_info "device..: $DEVICE"
WWPN=$(cat $1/fcp/wwpn) || RETVAL=1
- echo "wwpn....: $WWPN"
+ pr_info "wwpn....: $WWPN"
LUN=$(cat $1/fcp/lun) || RETVAL=1
- echo "lun.....: $LUN"
+ pr_info "lun.....: $LUN"
BOOTPROG=$(cat $1/fcp/bootprog) || RETVAL=1
- echo "bootprog: $BOOTPROG"
+ pr_info "bootprog: $BOOTPROG"
BR_LBA=$(cat $1/fcp/br_lba) || RETVAL=1
- echo "br_lba..: $BR_LBA"
+ pr_info "br_lba..: $BR_LBA"
}
print_ccw_device()
{
DEVICE=$(cat $1/ccw/device) || RETVAL=1
- echo "device..: $DEVICE"
+ pr_info "device..: $DEVICE"
}
print_nss_name()
{
NAME=$(cat $1/nss/device) || RETVAL=1
- echo "device..: $NAME"
+ pr_info "device..: $NAME"
}
status_dump()
{
CONF_DUMP_TYPE=$(cat $DUMP_CONFIG_DIR/dump_type) || RETVAL=1
if [ "$CONF_DUMP_TYPE" == "none" ]; then
- echo "type....: no dump device configured"
+ pr_info "type....: no dump device configured"
elif [ "$CONF_DUMP_TYPE" == "ccw" ]; then
- echo "type....: ccw"
+ pr_info "type....: ccw"
print_ccw_device $DUMP_CONFIG_DIR
verify_ccw_dump_device $(cat $DUMP_CONFIG_DIR/ccw/device)
elif [ "$CONF_DUMP_TYPE" == "fcp" ]; then
- echo "type....: fcp"
+ pr_info "type....: fcp"
print_fcp_device $DUMP_CONFIG_DIR
else
- echo "ERROR: Unknown dump device type '$CONF_DUMP_TYPE'!" >&2
- echo " Please check if you have the latest dumpconf package!" >&2
+ pr_error "ERROR: Unknown dump device type '$CONF_DUMP_TYPE'!"
+ pr_error " Please check if you have the latest dumpconf package!"
fi
}
status_reipl()
{
REIPL_TYPE=$(cat $REIPL_CONFIG_DIR/reipl_type) || RETVAL=1
- echo "type....: $REIPL_TYPE"
+ pr_info "type....: $REIPL_TYPE"
if [ "$REIPL_TYPE" == "ccw" ]; then
print_ccw_device $REIPL_CONFIG_DIR
elif [ "$REIPL_TYPE" == "fcp" ]; then
@@ -327,16 +387,16 @@ status_reipl()
elif [ "$REIPL_TYPE" == "nss" ]; then
print_nss_name $REIPL_CONFIG_DIR
else
- echo "ERROR: Unknown reipl device type '$REIPL_TYPE'!" >&2
- echo " Please check if you have the latest dumpconf package!" >&2
+ pr_error "ERROR: Unknown reipl device type '$REIPL_TYPE'!"
+ pr_error " Please check if you have the latest dumpconf package!"
fi
}
status_dump_reipl()
{
- echo -e "\ndump:"
+ pr_info -e "\ndump:"
status_dump
- echo -e "\nreipl:"
+ pr_info -e "\nreipl:"
status_reipl
}
@@ -345,33 +405,65 @@ status_vmcmd()
{
VMCMD=$(cat $VMCMD_CONFIG_DIR/on_panic) || RETVAL=1
if [ "$VMCMD" == "" ]; then
- echo "WARNING: No VM command specified!"
+ pr_info "WARNING: No VM command specified!"
else
- echo "---------------"
- echo "$VMCMD"
+ pr_info "---------------"
+ pr_info "$VMCMD"
fi
}
start()
{
+ if [ "$1" == "background" ]; then
+ BACKGROUND=1
+ fi
+ test -n "$DELAY_MINUTES" || DELAY_MINUTES=0
+ test "$DELAY_MINUTES" -ge 0 2>/dev/null || RETVAL=1
+ if [ $RETVAL -eq 1 ]; then
+ pr_error "ERROR: Invalid DELAY_MINUTES parameter" \
+ "'$DELAY_MINUTES'." $ERRMSG
+ return
+ fi
+ if [ $DELAY_MINUTES -gt 0 ]; then
+ if [ -f $PIDFILE ]; then
+ pr_info "A delayed instance of" $CMD \
+ "is already active."
+ return
+ fi
+ if [ $BACKGROUND -eq 1 ]; then
+ delay_activation
+ else
+ pr_info "The activation of dumpconf is being delayed" \
+ "for" $DELAY_MINUTES "minutes"
+ $CMDFULL start background > /dev/null 2>&1 &
+ return
+ fi
+ fi
if [ "$ON_PANIC" == "" ]; then
ON_PANIC="stop"
fi
- if [ "$ON_PANIC" == "reipl" ]; then
- setup_reipl
- elif [ "$ON_PANIC" == "dump" ] || [ "$ON_PANIC" == "dump_reipl" ]; then
- setup_dump
- elif [ "$ON_PANIC" == "vmcmd" ]; then
- setup_on_panic_vmcmd
- elif [ "$ON_PANIC" == "stop" ]; then
- echo "stop on panic configured."
- else
- echo "ERROR: Unknown 'on panic' type '$ON_PANIC'." $ERRMSG >&2
- RETVAL=1
- fi
+ case "$ON_PANIC" in
+ reipl)
+ setup_reipl
+ ;;
+ dump|dump_reipl)
+ setup_dump
+ ;;
+ vmcmd)
+ setup_on_panic_vmcmd
+ ;;
+ stop)
+ pr_info "stop on panic configured."
+ ;;
+ *)
+ pr_error "ERROR: Unknown 'on panic'" \
+ "type '$ON_PANIC'." $ERRMSG
+ RETVAL=1
+ ;;
+ esac
if [ $RETVAL -eq 1 ]; then
- return $RETVAL
+ return
fi
echo $ON_PANIC > $ON_PANIC_CONFIG_FILE 2> /dev/null || RETVAL=1
@@ -380,20 +472,21 @@ start()
if [ $RETVAL -eq 1 ]; then
echo stop > $ON_PANIC_CONFIG_FILE
- echo "ERROR: $ON_PANIC not supported by hardware!" >&2
+ pr_error "ERROR: $ON_PANIC not supported by hardware!"
fi
-
- return $RETVAL
}
stop()
{
+ if [ -f $PIDFILE ]; then
+ kill -TERM $(cat $PIDFILE)
+ fi
echo none > $DUMP_CONFIG_DIR/dump_type || RETVAL=1
echo stop > $ON_PANIC_CONFIG_FILE || RETVAL=1
if [ $RETVAL -eq 0 ]; then
- echo "Dump on panic is disabled now"
+ pr_info "Dump on panic is disabled now"
else
- echo "Disabling dump on panic failed" >&2
+ pr_error "Disabling dump on panic failed"
fi
return $RETVAL
}
@@ -401,34 +494,55 @@ stop()
status()
{
ON_PANIC=$(cat $ON_PANIC_CONFIG_FILE) || RETVAL=1
- echo "on_panic: $ON_PANIC"
- if [ "$ON_PANIC" == "vmcmd" ]; then
- status_vmcmd
- elif [ "$ON_PANIC" == "reipl" ]; then
- status_reipl
- elif [ "$ON_PANIC" == "dump" ]; then
- status_dump
- elif [ "$ON_PANIC" == "dump_reipl" ]; then
- status_dump_reipl
- elif [ "$ON_PANIC" != "stop" ]; then
- echo "ERROR: Unknown on_panic type '$ON_PANIC'" >&2
+ if [ -f $PIDFILE ]; then
+ pr_info "on_panic: $ON_PANIC - dumpconf activation is being" \
+ "delayed for $DELAY_MINUTES minutes"
+ else
+ pr_info "on_panic: $ON_PANIC"
fi
+ case "$ON_PANIC" in
+ vmcmd)
+ status_vmcmd
+ ;;
+ reipl)
+ status_reipl
+ ;;
+ dump)
+ status_dump
+ ;;
+ dump_reipl)
+ status_dump_reipl
+ ;;
+ stop)
+ ;;
+ *)
+ pr_error "ERROR: Unknown on_panic type '$ON_PANIC'"
+ ;;
+ esac
}
-if [ "$1" = "-h" ] || [ "$1" = "--help" ]; then
- printhelp
- exit 0
-elif [ "$1" = "-v" ] || [ "$1" = "--version" ]; then
- printversion
- exit 0
-fi
+case "$1" in
+ -h|--help)
+ printhelp
+ exit 0
+ ;;
+ -v|--version)
+ printversion
+ exit 0
+ ;;
+esac
check_environment
+# If system crashed, an invalid $PIDFILE might still exist
+if [ -f $PIDFILE ]; then
+ cleanup_pidfile $(cat $PIDFILE)
+fi
+
# See how we were called.
case "$1" in
start|restart|reload|force-reload|try-restart)
- start
+ start $2
;;
stop)
stop
@@ -439,6 +553,7 @@ case "$1" in
*)
print_invalid_option $1
RETVAL=1
+ ;;
esac
exit $RETVAL
diff --git a/etc/sysconfig/dumpconf b/etc/sysconfig/dumpconf
index cef621b..155a2cc 100644
--- a/etc/sysconfig/dumpconf
+++ b/etc/sysconfig/dumpconf
@@ -13,13 +13,19 @@
# /sys/firmware/reipl
#
-#
+# For the actions "reipl" and "dump_reipl" the DELAY_MINUTES keyword may
+# be used to delay the activation of dumpconf.
+# Thus potential reipl loops caused by kernel panics
+# which persistently occur early in the boot process can be prevented.
+
# Dump on ccw device (DASD) and re-IPL after dump is complete.
# The re-IPL device, as specified under "/sys/firmware/reipl", is used.
+# The activation of dumpconf is delayed by 5 minutes.
#
# ON_PANIC=dump_reipl
# DUMP_TYPE=ccw
# DEVICE=0.0.4e13
+# DELAY_MINUTES=5
#
# Dump on fcp device (SCSI Disk)
@@ -48,5 +54,7 @@
#
# Re-IPL on panic
# The re-IPL device, as specified under "/sys/firmware/reipl", is used.
+# Since the DELAY_MINUTES keyword is omitted, there is no delay and
+# dumpconf becomes active immediately during system startup.
#
# ON_PANIC=reipl
--
1.7.3.5

View File

@ -0,0 +1,410 @@
From bc6e654149018090b7954e6667d3c7e7654625f6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dan=20Hor=C3=A1k?= <dan@danny.cz>
Date: Fri, 28 Jan 2011 14:18:39 +0100
Subject: [PATCH 53/61] ttyrun: run a program if a terminal device is available
Summary: ttyrun: run a program if a terminal device is available
Description: Depending on your setup, Linux on System z might or might not
provide a particular terminal or console. ttyrun safely starts
getty programs and prevents respawns through the init program
if a terminal is not available.
---
iucvterm/doc/Makefile | 2 +-
iucvterm/doc/ttyrun.8 | 146 +++++++++++++++++++++++++++++++++++++++
iucvterm/src/Makefile | 11 +++-
iucvterm/src/ttyrun.c | 183 +++++++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 339 insertions(+), 3 deletions(-)
create mode 100644 iucvterm/doc/ttyrun.8
create mode 100644 iucvterm/src/ttyrun.c
diff --git a/iucvterm/doc/Makefile b/iucvterm/doc/Makefile
index 5815f21..a646765 100644
--- a/iucvterm/doc/Makefile
+++ b/iucvterm/doc/Makefile
@@ -2,7 +2,7 @@
include ../../common.mak
-MANS = iucvconn.1 iucvtty.1 ts-shell.1 hvc_iucv.9 chiucvallow.8
+MANS = iucvconn.1 iucvtty.1 ts-shell.1 hvc_iucv.9 chiucvallow.8 ttyrun.8
all:
diff --git a/iucvterm/doc/ttyrun.8 b/iucvterm/doc/ttyrun.8
new file mode 100644
index 0000000..fc7a16f
--- /dev/null
+++ b/iucvterm/doc/ttyrun.8
@@ -0,0 +1,146 @@
+.\" ttyrun.8
+.\"
+.\"
+.\" Copyright IBM Corp. 2010
+.\" Author(s): Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
+.\" -------------------------------------------------------------------------
+.TH "ttyrun" "8" "April 2010" "s390-tools" "System Management Commands"
+.LO 8
+.
+.ds s ttyrun
+.
+.
+.SH NAME
+ttyrun \- Start a program if a specified terminal device is available
+.
+.
+.
+.SH SYNOPSIS
+.B \*s
+.RB [ \-e | \-\-exitstatus
+.IR status ]
+.I term
+.I program
+.RI [ "program_options" ]
+.br
+.B \*s
+.RB [ \-h | \-\-help ]
+.br
+.B \*s
+.RB [ \-v | \-\-version ]
+.
+.
+.
+.SH DESCRIPTION
+\fB\*s\fP is typically started during system initialization and is used
+to prevent a respawn through the
+.BR init (8)
+program when a terminal is not available.
+
+\fIterm\fP is the name of the terminal device and is a path relative to
+the \f(CW/dev\fP directory, for example, specify \f(CWhvc0\fP for
+\f(CW/dev/hvc0\fP.
+.br
+If the specified terminal device can be opened, \fB\*s\fP starts the
+specified program.
+
+If the terminal device cannot be opened, the behavior of \fB\*s\fP
+depends on the \fB\-e\fP option:
+.
+.RS 2
+.IP "\(bu" 2
+If the \fB\-e\fP option has been specified, \fB\*s\fP exits with the
+specified return value, or
+.IP "\(bu" 2
+If the \fB\-e\fP option has not been specified, \fB\*s\fP sleeps until
+it receives a signal that causes an exit.
+.RE
+.PP
+\fIprogram\fP is an absolute path to the program to be started by
+\fB\*s\fP and \fIprogram_options\fP specify additional arguments.
+Depending on the program, arguments might be required. The variable
+\f(CW%t\fP in the \fIprogram_options\fP is resolved to the terminal
+device specified with \fIterm\fP.
+.
+.
+.
+.SH OPTIONS
+.TP
+.BR \-e ", " \-\-exitstatus\~\fIstatus\fP
+Specifies an exit status that is returned when the terminal device
+is not available. \fIstatus\fP must be an integer in the range 1 to 255.
+
+You can use this status value in an upstart job file to prevent
+respawning.
+.
+.TP
+.BR \-h ", " \-\-help
+Displays a short help text, then exits.
+.
+.TP
+.BR \-v ", " \-\-version
+Displays the version number of \fB\*s\fP, then exits.
+.
+.
+.
+.SH "RETURN VALUES"
+\fB\*s\fP exits with one of the following return values to report an
+error condition:
+.TP
+.B 1
+\fB\*s\fP has been started with an argument that is not valid or
+required but missing.
+.TP
+.B 2
+\fB\*s\fP could open the file specified for \fIterm\fP but the
+file is not a terminal device.
+.TP
+.B 3
+\fB\*s\fP could not start the specified program.
+.PP
+The return values 1 to 3 might also be returned when the \fB\-e\fP
+option is used and the terminal device is not available.
+.TP
+.B 4 \- 255
+The terminal device is not available and the \fB\-e\fP option
+specifies an exit status in this range.
+.
+.
+.
+.SH "EXAMPLES"
+.SS inittab
+To start \fB/sbin/agetty\fP on terminal device "hvc1", specify:
+.PP
+.ft CW
+.in +0.25in
+.nf
+h1:2345:respawn:/sbin/\*s hvc1 /sbin/agetty -L 9600 %t linux
+.fi
+.in -0.25in
+.ft
+.
+.SS upstart job/event files
+To start \fB/sbin/agetty\fP on terminal device "hvc1", add the following
+settings to the job file:
+.PP
+.ft CW
+.in +0.25in
+.nf
+respawn
+normal exit 42
+exec /sbin/\*s -e 42 hvc1 /sbin/agetty -L 9600 %t linux
+.fi
+.in -0.25in
+.ft
+.PP
+With the normal exit statement, you specify an exit status that will
+prevent upstart from respawning the program. To prevent respawning with
+\fB\*s\fP, you must specify the same value for the \fB\-e\fP option.
+.
+.
+.
+.SH "SEE ALSO"
+.BR agetty (8),
+.BR mingetty (8),
+.BR inittab (5),
+.BR events (5)
diff --git a/iucvterm/src/Makefile b/iucvterm/src/Makefile
index f1f8f7c..369c887 100644
--- a/iucvterm/src/Makefile
+++ b/iucvterm/src/Makefile
@@ -11,20 +11,27 @@ CPPFLAGS += -DUSE_NLS -DGETTEXT_TEXTDOMAIN=\"$(GETTEXT_TEXTDOMAIN)\"
#CPPFLAGS += -D__DEBUG__
PROGRAMS = iucvconn iucvtty
+SYSTOOLS = ttyrun
-all: $(PROGRAMS)
+all: $(PROGRAMS) $(SYSTOOLS)
check:
install:
for prg in $(PROGRAMS); do \
$(INSTALL) -g $(GROUP) -o $(OWNER) -m 755 $$prg $(USRBINDIR) ; \
done
+ for prg in $(SYSTOOLS); do \
+ $(INSTALL) -g $(GROUP) -o $(OWNER) -m 755 $$prg $(BINDIR) ; \
+ done
clean:
- -rm -f *.o $(PROGRAMS)
+ -rm -f *.o $(PROGRAMS) $(SYSTOOLS)
iucvconn: iucvconn.o getopt.o auditlog.o functions.o
iucvtty: LDLIBS = -lutil
iucvtty: iucvtty.o getopt.o auditlog.o functions.o
+ttyrun: GETTEXT_TEXTDOMAIN = ttyrun
+ttyrun: ttyrun.o
+
.PHONY: install clean
diff --git a/iucvterm/src/ttyrun.c b/iucvterm/src/ttyrun.c
new file mode 100644
index 0000000..55c2bc2
--- /dev/null
+++ b/iucvterm/src/ttyrun.c
@@ -0,0 +1,183 @@
+/*
+ * ttyrun - Start a program if a specified terminal device is available
+ *
+ *
+ * ttyrun is typically used to prevent a respawn through the init(8)
+ * program when a terminal is not available.
+ * ttyrun runs the specific program if the specified terminal device
+ * can be opened successfully. Otherwise the program enters a sleep or
+ * exits with a specified return value.
+ *
+ * Example: To start /sbin/agetty on terminal device hvc1, use:
+ *
+ * h1:2345:respawn:/sbin/ttyrun hvc1 /sbin/agetty -L 9600 %t linux
+ *
+ * Note: %t is resolved to the terminal device "hvc1" before /sbin/agetty
+ * is started.
+ *
+ * Return values:
+ * 1 - invalid argument or parameter is missing
+ * 2 - terminal does not resolve to a terminal device
+ * 3 - starting the specified program failed
+ * 1..255 - terminal is not available and the return code is
+ * specified with the -e option
+ *
+ * Copyright IBM Corp. 2010
+ * Author(s): Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
+ */
+#include <errno.h>
+#include <getopt.h>
+#include <limits.h>
+#include <signal.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <sys/types.h>
+#include <syslog.h>
+#include <fcntl.h>
+#include <unistd.h>
+
+#include "zt_common.h"
+
+
+#define TTY_ESCAPE_STR "%t"
+
+#define EXIT_INVALID_ARG 1
+#define EXIT_NO_TERMINAL 2
+#define EXIT_EXEC_FAILED 3
+
+
+static const char usage[] =
+"Usage: %s [-e status] <term> <program> [<program_options>]\n"
+" %s [-h|--help] [-v|--version]\n"
+"\n"
+"Start the program if the specified terminal device is available.\n"
+"If the terminal device cannot be opened, sleep until a signal is received\n"
+"that causes an exit or exit with the return value specified with status.\n"
+"\n"
+"-e, --exitstatus Specifies an exit status in the range 1 to 255.\n"
+"-h, --help Displays this help, then exits.\n"
+"-v, --version Displays version information, then exits.\n";
+
+static void help_exit(const char *prg)
+{
+ printf(usage, prg, prg);
+ exit(EXIT_SUCCESS);
+}
+
+static void version_exit(const char *prg)
+{
+ printf("%s: Start a program if a terminal device is available, "
+ "version %s\n", prg, RELEASE_STRING);
+ printf("Copyright IBM Corp. 2010\n");
+ exit(EXIT_SUCCESS);
+}
+
+static void err_exit(const char *prg, const char *msg)
+{
+ fprintf(stderr, "%s: %s\n", prg, msg);
+ exit(EXIT_INVALID_ARG);
+}
+
+static void wait_and_exit(void)
+{
+ /* sleep until a signal is received, then exit */
+ pause();
+ exit(EXIT_SUCCESS);
+}
+
+static const struct option prog_opts[] = {
+ { "help", no_argument, NULL, 'h'},
+ { "version", no_argument, NULL, 'v'},
+ { "exitstatus", required_argument, NULL, 'e'},
+ { NULL, no_argument, NULL, 0 },
+};
+
+int main(int argc, char *argv[])
+{
+ int rc, tty, i, c, index, done, term_index;
+ char terminal[PATH_MAX] = "";
+ unsigned long exitstatus;
+
+
+ /* parse command options */
+ if (argc == 1)
+ err_exit(argv[0], "One or more options are required but missing");
+
+ exitstatus = done = term_index = 0;
+ while (!done) {
+ c = getopt_long(argc, argv, "-hve:", prog_opts, NULL);
+ switch (c) {
+ case -1:
+ done = 1;
+ break;
+ case 1:
+ /* the first non-optional argument must be the
+ * terminal device */
+ if (!strncmp(optarg, "/", 1))
+ strncpy(terminal, optarg, PATH_MAX - 1);
+ else
+ snprintf(terminal, PATH_MAX, "/dev/%s", optarg);
+ terminal[PATH_MAX - 1] = 0;
+ term_index = optind - 1;
+ done = 1;
+ break;
+ case 'e':
+ errno = 0;
+ exitstatus = strtoul(optarg, (char **) NULL, 10);
+ if (errno == ERANGE)
+ err_exit(argv[0], "The exit status must be "
+ "an integer in the range 1 to 255");
+
+ if (!exitstatus || exitstatus > 255)
+ err_exit(argv[0], "The exit status must be "
+ "in the range 1 to 255");
+ break;
+ case 'h':
+ help_exit(argv[0]);
+ case 'v':
+ version_exit(argv[0]);
+ case '?':
+ fprintf(stderr, "Try %s --help for more information\n",
+ argv[0]);
+ exit(EXIT_INVALID_ARG);
+ }
+ }
+ index = optind;
+
+ /* check terminal */
+ if (!strlen(terminal))
+ err_exit(argv[0], "You must specify the name of "
+ "a terminal device");
+
+ /* any program to start? */
+ if (index == argc)
+ err_exit(argv[0], "You must specify a program to start");
+
+ /* open and check terminal device */
+ tty = open(terminal, O_NOCTTY | O_RDONLY | O_NONBLOCK);
+ if (tty == -1) {
+ openlog(argv[0], LOG_PID, LOG_DAEMON);
+ syslog(LOG_INFO, "Could not open tty %s (%s)", terminal,
+ strerror(errno));
+ closelog();
+
+ /* enter wait or exit */
+ if (exitstatus)
+ exit(exitstatus);
+ wait_and_exit();
+ }
+ rc = !isatty(tty);
+ close(tty);
+ if (rc)
+ exit(EXIT_NO_TERMINAL);
+
+ /* start getty program */
+ for (i = index; i < argc; i++)
+ if (!strcmp(argv[i], TTY_ESCAPE_STR) && term_index)
+ argv[i] = argv[term_index];
+ if (execv(argv[index], argv + index))
+ exit(EXIT_EXEC_FAILED);
+
+ exit(EXIT_SUCCESS);
+}
--
1.7.3.5

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,91 @@
From 7700e2333725199a42d929ceb7af803c609df196 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dan=20Hor=C3=A1k?= <dan@danny.cz>
Date: Fri, 28 Jan 2011 14:22:16 +0100
Subject: [PATCH 55/61] znetconf: support for OSA CHPID types OSX and OSM
Summary: znetconf: support for OSA CHPID types OSX and OSM
Description: New feature to enable znetconf to support the
new OSA CHPID types OSX and OSM.
---
zconf/lsznet.raw | 12 ++++++++++++
zconf/znetcontrolunits | 6 +++++-
2 files changed, 17 insertions(+), 1 deletions(-)
diff --git a/zconf/lsznet.raw b/zconf/lsznet.raw
index 9821ba3..a9f1247 100755
--- a/zconf/lsznet.raw
+++ b/zconf/lsznet.raw
@@ -41,6 +41,8 @@ readonly -a CU_CARDTYPE=(
"LCS OSA"
"LCS CLAW"
"OSN"
+ "OSX"
+ "OSM"
)
readonly -a CU_DEVNAME=(
@@ -53,6 +55,8 @@ readonly -a CU_DEVNAME=(
eth
eth
osn
+ eth
+ eth
)
readonly -a CU_GROUPCHANNELS=(
@@ -65,6 +69,8 @@ readonly -a CU_GROUPCHANNELS=(
2
2
3
+ 3
+ 3
)
readonly -a CHPIDTYPES=(
@@ -72,6 +78,8 @@ readonly -a CHPIDTYPES=(
[0x11]=OSD
[0x15]=OSN
[0x24]=IQD
+ [0x30]=OSM
+ [0x31]=OSX
)
# whitelist of network devices for TCP/IP stack, e.g. for Linux installers
@@ -83,6 +91,10 @@ readonly -a CU_TCPIP=(
3088/1e
3088/01
3088/60
+ 3088/61
+ 1731/06
+ 1731/02
+ 1731/02
)
readonly PREFIXFORMAT=[[:xdigit:]]*
diff --git a/zconf/znetcontrolunits b/zconf/znetcontrolunits
index e54e34b..7ee65f7 100644
--- a/zconf/znetcontrolunits
+++ b/zconf/znetcontrolunits
@@ -23,6 +23,8 @@ readonly -a CU=(
3088/60
3088/61
1731/06
+ 1731/02
+ 1731/02
)
readonly -a CU_DEVDRV=(
@@ -33,7 +35,9 @@ readonly -a CU_DEVDRV=(
ctcm
lcs
lcs
- lcs
+ claw
+ qeth
+ qeth
qeth
)
--
1.7.3.5

View File

@ -0,0 +1,68 @@
From ed12fec98c2365593e3b8bac14701112051028ad Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dan=20Hor=C3=A1k?= <dan@danny.cz>
Date: Fri, 28 Jan 2011 14:24:23 +0100
Subject: [PATCH 56/61] iucvtty: do not specify z/VM user ID as argument to login -h
Description: iucvtty: do not specify z/VM user ID as argument to login -h
Symptom: When establishing a terminal connection to an iucvtty
instance on a target system, iucvconn disconnects due to a
timeout of the login program. Users are not able to log in.
Problem: iucvtty passes the z/VM user ID of the originating guest
virtual machine as argument to the -h option of the login
program. The -h option specifies a host name that is used
when writing [uw]tmp records. Depending on the implementation
of the login program, login calls gethostbyname() to get the
FQDN of the hostname. If the target system does not have any
working network connection, the DNS query times out. The DNS
timeout might be greater than the timeout the login program
waits for user input. The login timeout is caused by a SIGALRM
signal that is registered before login calls gethostbyname().
If the DNS timeout is greater, login exits.
Solution: Do not specify the z/VM user ID when iucvtty starts the login
program. The workaround to avoid timeouts is to explicitly
specify the login program when starting iucvtty.
For example, use "iucvtty TERMID -- /bin/login".
---
iucvterm/src/iucvtty.c | 12 +++---------
1 files changed, 3 insertions(+), 9 deletions(-)
diff --git a/iucvterm/src/iucvtty.c b/iucvterm/src/iucvtty.c
index b9a2754..ef7e212 100644
--- a/iucvterm/src/iucvtty.c
+++ b/iucvterm/src/iucvtty.c
@@ -48,21 +48,15 @@ static void sig_handler(int sig)
/**
* exec_login_prog() - execute a login program
* @cmd: Path to the (login) program executable
- * @host: Originator host that is passed to /bin/login
*/
-static int exec_login_prog(char *cmd[], const char *host)
+static int exec_login_prog(char *cmd[])
{
int rc;
if (cmd != NULL)
rc = execv(cmd[0], cmd);
else
- /* for root only: write hostname to [uw]tmp if set */
- if (geteuid() == 0 && host != NULL)
- rc = execl("/bin/login", "/bin/login", "-h", host,
- (char *) NULL);
- else
- rc = execl("/bin/login", "/bin/login", (char *) NULL);
+ rc = execl("/bin/login", "/bin/login", (char *) NULL);
return rc;
}
@@ -110,7 +104,7 @@ static int iucvtty_worker(int client, int master, int slave,
exit(2);
}
setenv("TERM", term_env, 1);
- if (exec_login_prog(cfg->cmd_parms, host)) {
+ if (exec_login_prog(cfg->cmd_parms)) {
print_error("Running the login program failed");
iucvtty_tx_error(client, ERR_CANNOT_EXEC_LOGIN);
}
--
1.7.3.5

View File

@ -0,0 +1,340 @@
From a3fd27a0ce5920b66afbf89cb83a9b61db9460c7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dan=20Hor=C3=A1k?= <dan@danny.cz>
Date: Fri, 28 Jan 2011 14:26:53 +0100
Subject: [PATCH 57/61] tunedasd: add new option -Q / --query_reserve
Summary: tunedasd: add new option -Q / --query_reserve
Description: The new option -Q / --query_reserve uses the BIODASDSNID ioctl to
determine the device reservation status for the given device and
prints it to stdout.
---
tunedasd/include/disk.h | 1 +
tunedasd/man/tunedasd.8 | 22 +++++++++-
tunedasd/src/disk.c | 65 +++++++++++++++++++++++++++++
tunedasd/src/tunedasd.c | 104 +++++++++++++++++++++++++++--------------------
4 files changed, 147 insertions(+), 45 deletions(-)
diff --git a/tunedasd/include/disk.h b/tunedasd/include/disk.h
index 4b98fb0..ece8cb5 100644
--- a/tunedasd/include/disk.h
+++ b/tunedasd/include/disk.h
@@ -25,6 +25,7 @@ int disk_set_cache (char* device, char* cache, char* no_cyl);
int disk_reserve (char* device);
int disk_release (char* device);
int disk_slock (char* device);
+int disk_query_reserve_status(char* device);
int disk_profile (char* device, char* prof_item);
int disk_reset_prof (char* device);
diff --git a/tunedasd/man/tunedasd.8 b/tunedasd/man/tunedasd.8
index 2d99bdc..a96913e 100644
--- a/tunedasd/man/tunedasd.8
+++ b/tunedasd/man/tunedasd.8
@@ -66,7 +66,6 @@ Enterprise Storage Servers (ESS):
(Record Access)
.IP "" 7
More details about caching can be found in the 'Storage Control Reference' of the attached storage server.
-
.TP
.BR "\-n" " or " "\-\-no_cyl" " <n> "
Number of cylinders to be cached (only valid together with --cache).
@@ -91,6 +90,27 @@ Profile info must be available and enabled
('echo set on > /proc/dasd/statistics')
in the kernel to get valid results out of the profile commands.
.TP
+.BR "\-Q" " or " "\-\-query_reserve"
+Query the current reserve status of the device.
+The following states are defined:
+.br
+.IP " \(bu" 12
+.I none:
+The device is not reserved.
+.IP " \(bu" 12
+.I implicit:
+The device is not reserved, but there is a contingent or implicit
+allegiance to this Linux instance.
+.IP " \(bu" 12
+.I other:
+The device is reserved to another operating system instance.
+.IP " \(bu" 12
+.I reserved:
+The device is reserved to this Linux instance.
+.IP "" 7
+More details about reserve/release can be found in the 'Storage Control Reference' of the attached storage server.
+
+.TP
.BR "\-I" " or " "\-\-prof_item <row> "
Print single profile item data row (without header).
.br
diff --git a/tunedasd/src/disk.c b/tunedasd/src/disk.c
index afbe851..3eaa4f3 100644
--- a/tunedasd/src/disk.c
+++ b/tunedasd/src/disk.c
@@ -68,6 +68,25 @@ typedef struct attrib_data_t {
#define DASD_REC_ACCESS 0x5
/*
+ * Data returned by Sense Path Group ID (SNID)
+ */
+struct dasd_snid_data {
+ struct {
+ __u8 group:2;
+ __u8 reserve:2;
+ __u8 mode:1;
+ __u8 res:3;
+ } __attribute__ ((packed)) path_state;
+ __u8 pgid[11];
+} __attribute__ ((packed));
+
+struct dasd_snid_ioctl_data {
+ struct dasd_snid_data data;
+ __u8 path_mask;
+} __attribute__ ((packed));
+
+
+/*
* DASD-IOCTLs (copied from dasd.h)
*/
/* Issue a reserve/release command, rsp. */
@@ -85,6 +104,9 @@ typedef struct attrib_data_t {
/* Set Attributes (cache operations) */
#define BIODASDSATTR _IOW (DASD_IOCTL_LETTER,2,attrib_data_t)
+/* Get Sense Path Group ID (SNID) data */
+#define BIODASDSNID _IOWR(DASD_IOCTL_LETTER, 1, struct dasd_snid_ioctl_data)
+
/* id definition for profile items */
enum prof_id {
@@ -378,6 +400,49 @@ disk_slock (char* device)
return 0;
}
+
+/*
+ * Uses the Sense Path Group ID (SNID) ioctl to find out if
+ * a device is reserved to it's path group.
+ */
+int
+disk_query_reserve_status(char* device)
+{
+ int fd;
+ struct dasd_snid_ioctl_data snid;
+
+ /* Open device file */
+ fd = open (device, O_RDONLY);
+ if (fd == -1) {
+ error_print ("<%s> - %s", device, strerror (errno));
+ return -1;
+ }
+ snid.path_mask = 0;
+ /* Release device */
+ if (ioctl(fd, BIODASDSNID, &snid)) {
+ error_print("Could not read reserve status"
+ " for device <%s>", device);
+ close (fd);
+ return -1;
+ }
+ switch (snid.data.path_state.reserve) {
+ case 0:
+ printf("none\n");
+ break;
+ case 1:
+ printf("implicit\n");
+ break;
+ case 2:
+ printf("other\n");
+ break;
+ case 3:
+ printf("reserved\n");
+ break;
+ }
+ close (fd);
+ return 0;
+}
+
int
disk_profile_summary (dasd_profile_info_t dasd_profile_info)
{
diff --git a/tunedasd/src/tunedasd.c b/tunedasd/src/tunedasd.c
index 05e0344..fbb7a1e 100644
--- a/tunedasd/src/tunedasd.c
+++ b/tunedasd/src/tunedasd.c
@@ -47,6 +47,7 @@ static const char* usage_text[] = {
"-O, --slock Unconditional reserve device",
" Note: Use with care, this breaks an existing "
"lock",
+ "-Q, --query_reserve Print reserve status of device ",
"-P, --profile Print profile info of device",
"-I, --prof_item Print single profile item",
" (reqs/sects/sizes/total/totsect/start/irq/",
@@ -54,21 +55,22 @@ static const char* usage_text[] = {
"-R, --reset_prof Reset profile info of device"
};
-#define CMD_KEYWORD_NUM 11
+#define CMD_KEYWORD_NUM 12
#define DEVICES_NUM 256
enum cmd_keyword_id {
- cmd_keyword_help = 0,
- cmd_keyword_version = 1,
- cmd_keyword_get_cache = 2,
- cmd_keyword_cache = 3,
- cmd_keyword_no_cyl = 4,
- cmd_keyword_reserve = 5,
- cmd_keyword_release = 6,
- cmd_keyword_slock = 7,
- cmd_keyword_profile = 8,
- cmd_keyword_prof_item = 9,
- cmd_keyword_reset_prof = 10,
+ cmd_keyword_help = 0,
+ cmd_keyword_version = 1,
+ cmd_keyword_get_cache = 2,
+ cmd_keyword_cache = 3,
+ cmd_keyword_no_cyl = 4,
+ cmd_keyword_reserve = 5,
+ cmd_keyword_release = 6,
+ cmd_keyword_slock = 7,
+ cmd_keyword_profile = 8,
+ cmd_keyword_prof_item = 9,
+ cmd_keyword_reset_prof = 10,
+ cmd_keyword_query_reserve = 11,
};
@@ -77,17 +79,18 @@ static const struct {
char* keyword;
enum cmd_keyword_id id;
} keyword_list[] = {
- { "help", cmd_keyword_help },
- { "version", cmd_keyword_version },
- { "get_cache", cmd_keyword_get_cache },
- { "cache", cmd_keyword_cache },
- { "no_cyl", cmd_keyword_no_cyl },
- { "reserve", cmd_keyword_reserve },
- { "release", cmd_keyword_release },
- { "slock", cmd_keyword_slock },
- { "profile", cmd_keyword_profile },
- { "prof_item", cmd_keyword_prof_item },
- { "reset_prof", cmd_keyword_reset_prof }
+ { "help", cmd_keyword_help },
+ { "version", cmd_keyword_version },
+ { "get_cache", cmd_keyword_get_cache },
+ { "cache", cmd_keyword_cache },
+ { "no_cyl", cmd_keyword_no_cyl },
+ { "reserve", cmd_keyword_reserve },
+ { "release", cmd_keyword_release },
+ { "slock", cmd_keyword_slock },
+ { "profile", cmd_keyword_profile },
+ { "prof_item", cmd_keyword_prof_item },
+ { "reset_prof", cmd_keyword_reset_prof },
+ { "query_reserve", cmd_keyword_query_reserve }
};
@@ -100,21 +103,22 @@ enum cmd_key_state {
/* Determines which combination of keywords are valid */
enum cmd_key_state cmd_key_table[CMD_KEYWORD_NUM][CMD_KEYWORD_NUM] = {
- /* help vers get_ cach no_c rese rele sloc prof prof rese
- * ion cach e yl rve ase k ile _ite t_pr
- * e m of
- */
- /* help */ { req, opt, opt, opt, opt, opt, opt, opt, opt, opt, opt },
- /* version */ { inv, req, inv, inv, inv, inv, inv, inv, inv, inv, inv },
- /* get_cache */ { opt, opt, req, inv, inv, inv, inv, inv, inv, inv, inv },
- /* cache */ { opt, opt, inv, req, opt, inv, inv, inv, inv, inv, inv },
- /* no_cyl */ { opt, opt, inv, req, req, inv, inv, inv, inv, inv, inv },
- /* reserve */ { opt, opt, inv, inv, inv, req, inv, inv, inv, inv, inv },
- /* release */ { opt, opt, inv, inv, inv, inv, req, inv, inv, inv, inv },
- /* slock */ { opt, opt, inv, inv, inv, inv, inv, req, inv, inv, inv },
- /* profile */ { opt, opt, inv, inv, inv, inv, inv, inv, req, opt, inv },
- /* prof_item */ { opt, opt, inv, inv, inv, inv, inv, inv, req, req, inv },
- /* reset_prof */ { opt, opt, inv, inv, inv, inv, inv, inv, inv, inv, req },
+ /* help vers get_ cach no_c rese rele sloc prof prof rese quer
+ * ion cach e yl rve ase k ile _ite t_pr y_re
+ * e m of serv
+ */
+ /* help */ { req, opt, opt, opt, opt, opt, opt, opt, opt, opt, opt, inv },
+ /* version */ { inv, req, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv },
+ /* get_cache */ { opt, opt, req, inv, inv, inv, inv, inv, inv, inv, inv, inv },
+ /* cache */ { opt, opt, inv, req, opt, inv, inv, inv, inv, inv, inv, inv },
+ /* no_cyl */ { opt, opt, inv, req, req, inv, inv, inv, inv, inv, inv, inv },
+ /* reserve */ { opt, opt, inv, inv, inv, req, inv, inv, inv, inv, inv, inv },
+ /* release */ { opt, opt, inv, inv, inv, inv, req, inv, inv, inv, inv, inv },
+ /* slock */ { opt, opt, inv, inv, inv, inv, inv, req, inv, inv, inv, inv },
+ /* profile */ { opt, opt, inv, inv, inv, inv, inv, inv, req, opt, inv, inv },
+ /* prof_item */ { opt, opt, inv, inv, inv, inv, inv, inv, req, req, inv, inv },
+ /* reset_prof */ { opt, opt, inv, inv, inv, inv, inv, inv, inv, inv, req, inv },
+ /* query_reserve */ { inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, req },
};
struct parameter {
@@ -141,11 +145,12 @@ static struct option options[] = {
{ "profile", no_argument, NULL, 'P'},
{ "prof_item", required_argument, NULL, 'I'},
{ "reset_prof", no_argument, NULL, 'R'},
+ { "query_reserve", no_argument, NULL, 'Q'},
{ NULL, 0, NULL, 0 }
};
/* Command line option abbreviations */
-static const char option_string[] = "hvgc:n:SLOPI:R";
+static const char option_string[] = "hvgc:n:SLOPI:RQ";
/* Error message string */
@@ -372,6 +377,11 @@ get_command_line (int argc, char* argv[], struct command_line* line)
rc = store_option (&cmdline, cmd_keyword_reset_prof,
optarg);
break;
+ case 'Q':
+ rc = store_option (&cmdline, cmd_keyword_query_reserve,
+ optarg);
+ break;
+
case -1:
/* End of options string - start of devices list */
cmdline.device_id = optind;
@@ -431,8 +441,11 @@ do_command (char* device, struct command_line cmdline)
rc = disk_reset_prof (device);
break;
case cmd_keyword_prof_item:
- break;
- default:
+ break;
+ case cmd_keyword_query_reserve:
+ rc = disk_query_reserve_status(device);
+ break;
+ default:
error_print ("Unknown command '%s' specified",
get_keyword_name (i));
break;
@@ -449,7 +462,7 @@ int
main (int argc, char* argv[])
{
struct command_line cmdline;
- int rc;
+ int rc, finalrc;
/* Find out what we're supposed to do */
rc = get_command_line (argc, argv, &cmdline);
@@ -484,9 +497,12 @@ main (int argc, char* argv[])
return 1;
}
- while (cmdline.device_id < argc) {
+ finalrc = 0;
+ while (cmdline.device_id < argc) {
rc = do_command (argv[cmdline.device_id], cmdline);
+ if (rc && !finalrc)
+ finalrc = rc;
cmdline.device_id++;
}
- return 0;
+ return finalrc;
}
--
1.7.3.5

View File

@ -0,0 +1,96 @@
From f877ca62c13e475d55f6fe3fac5c9732ed44b49e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dan=20Hor=C3=A1k?= <dan@danny.cz>
Date: Fri, 28 Jan 2011 14:27:39 +0100
Subject: [PATCH 58/61] fdasd/dasdfmt: fix format 7 label
Description: fdasd/dasdfmt: fix format 7 label
Symptom: Backups of Linux on System z disks from z/OS do not work
when the disk is not fully partitioned.
Problem: The format 7 label written by fdasd and dasdfmt is incorrect.
The extend for free space has one track less than required
which is recognized as inconsistent vtoc state by z/OS tools.
Solution: Fix libvtoc to write the format 7 label correctly.
---
libvtoc/vtoc.c | 22 +++++++++++++---------
1 files changed, 13 insertions(+), 9 deletions(-)
diff --git a/libvtoc/vtoc.c b/libvtoc/vtoc.c
index cebd5a4..36269a4 100644
--- a/libvtoc/vtoc.c
+++ b/libvtoc/vtoc.c
@@ -1204,7 +1204,7 @@ void vtoc_update_format7_label_add (format7_label_t *f7, int verbose,
if ((ext->a + ext->b) == 0x00000000)
continue;
- if ((ext->b + 1) == tmp->a) {
+ if ((ext->b) == tmp->a) {
/* this extent precedes the new one */
ext->b = tmp->b;
bzero(tmp, sizeof(ds7ext_t));
@@ -1216,7 +1216,7 @@ void vtoc_update_format7_label_add (format7_label_t *f7, int verbose,
continue;
}
- if (ext->a == (tmp->b + 1))
+ if (ext->a == (tmp->b))
{
/* this extent succeeds the new one */
ext->a = tmp->a;
@@ -1240,7 +1240,7 @@ void vtoc_update_format7_label_del (format7_label_t *f7, int verbose,
{
ds7ext_t *ext;
int i, counter=0;
-
+
for (i=0; i<16; i++) {
if (i<5)
ext = &f7->DS7EXTNT[i];
@@ -1258,7 +1258,7 @@ void vtoc_update_format7_label_del (format7_label_t *f7, int verbose,
if ((a == ext->a) && (b < ext->b)) {
/* left-bounded in free space gap */
- ext->a = b + 1;
+ ext->a = b;
if (verbose)
printf("FMT7 add extent: left-bounded\n");
counter++;
@@ -1267,7 +1267,7 @@ void vtoc_update_format7_label_del (format7_label_t *f7, int verbose,
if ((a > ext->a) && (b == ext->b)) {
/* right-bounded in free space gap */
- ext->b = a - 1;
+ ext->b = a;
if (verbose)
printf("FMT7 add extent: right-bounded\n");
counter++;
@@ -1277,8 +1277,8 @@ void vtoc_update_format7_label_del (format7_label_t *f7, int verbose,
if ((a > ext->a) && (b < ext->b)) {
/* partition devides free space into 2 pieces */
vtoc_update_format7_label_add(f7, verbose,
- b+1, ext->b);
- ext->b = a - 1;
+ b, ext->b);
+ ext->b = a;
if (verbose)
printf("FMT7 add extent: 2 pieces\n");
counter++;
@@ -1311,10 +1311,14 @@ void vtoc_set_freespace(format4_label_t *f4, format5_label_t *f5,
{
if ((cyl * trk) > BIG_DISK_SIZE) {
if (ch == '+') {
- vtoc_update_format7_label_add(f7, verbose, start,stop);
+ vtoc_update_format7_label_add(f7, verbose, start,
+ /* ds7ext RTA + 1 */
+ stop + 1);
}
else if (ch == '-') {
- vtoc_update_format7_label_del(f7, verbose, start,stop);
+ vtoc_update_format7_label_del(f7, verbose, start,
+ /* ds7ext RTA + 1 */
+ stop + 1);
}
else {
printf("BUG: syntax error in vtoc_set_freespace.\n");
--
1.7.3.5

View File

@ -0,0 +1,69 @@
From f127d0df43f5fe5709f068e0c79bef0b759cb6fe Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dan=20Hor=C3=A1k?= <dan@danny.cz>
Date: Fri, 28 Jan 2011 14:28:35 +0100
Subject: [PATCH 59/61] cpuplugd: cmm_pages not set and restored correctly
Description: cpuplugd: cmm_pages not set and restored correctly
Symptom: /proc/sys/vm/cmm_pages will be restored to 0 after program exit,
regardless of previous value, if cpuplugd is run with an invalid
memory configuration, e.g. cmm_min commented out. Also, cmm_pages
will not correctly reach a cmm_min of 0 during run-time, in a case
where cmm_pages is equal to cmm_inc.
Problem: Incorrect checks on program exit, and in the memplug function.
Solution: Fix checks on program exit and memplug.
---
cpuplugd/config.c | 1 +
cpuplugd/daemon.c | 4 ++--
cpuplugd/mem.c | 2 +-
3 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/cpuplugd/config.c b/cpuplugd/config.c
index e853ea7..bda7780 100644
--- a/cpuplugd/config.c
+++ b/cpuplugd/config.c
@@ -358,6 +358,7 @@ void check_config(struct config *cfg)
if (foreground == 0)
syslog(LOG_INFO, "No valid memory hotplug "
"configuration detected\n");
+ memory = 0;
} else {
memory = 1;
/*
diff --git a/cpuplugd/daemon.c b/cpuplugd/daemon.c
index 391acba..4dab372 100644
--- a/cpuplugd/daemon.c
+++ b/cpuplugd/daemon.c
@@ -125,7 +125,7 @@ void clean_up()
syslog(LOG_INFO, "terminated\n");
remove(pid_file);
reactivate_cpus();
- if (check_cmmfiles() == 0)
+ if (memory)
cleanup_cmm();
exit(1);
}
@@ -139,7 +139,7 @@ void kill_daemon(int a)
syslog(LOG_INFO, "shutting down\n");
remove(pid_file);
reactivate_cpus();
- if (check_cmmfiles() == 0)
+ if (memory)
cleanup_cmm();
exit(0);
}
diff --git a/cpuplugd/mem.c b/cpuplugd/mem.c
index 13f902d..b15c7e2 100644
--- a/cpuplugd/mem.c
+++ b/cpuplugd/mem.c
@@ -163,7 +163,7 @@ int memplug(int size)
* new value: previous value - size
*/
new_size = old_size - size;
- if (new_size <= 0)
+ if (new_size < 0)
return -1;
filp = fopen("/proc/sys/vm/cmm_pages", "w");
if (!filp) {
--
1.7.3.5

View File

@ -0,0 +1,69 @@
From bdc3b89850bb437f48cb2f9fa31a8f51d3cd88b5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dan=20Hor=C3=A1k?= <dan@danny.cz>
Date: Fri, 28 Jan 2011 14:30:22 +0100
Subject: [PATCH 60/61] lsluns: Fix LUN reporting for SAN volume controller (SVC)
Description: lsluns: Fix LUN reporting for SAN volume controller (SVC)
Symptom: lsluns fails to report LUNs from SVC
Problem: The SCSI Architecture Model (SAM) specifies that a storage
server only has to support the REPORT LUNs command for LUN 0
or the "REPORT LUNS Well-Known-LUN" (WLUN). The SAN Volume
Controller (SVC) only supports REPORT LUNS on LUN 0. The
approach of lsluns of sending the REPORT LUNS to any attached
LUN does not work for the SVC.
Solution: Change the strategy of lsluns to check if the LUN 0 or the
WLUN is already available. If both LUNs are not available,
first try to attach LUN 0 and issue the command; if this
fails, try the WLUN.
---
zconf/lsluns | 14 +++++++++-----
1 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/zconf/lsluns b/zconf/lsluns
index 769b846..acbdcd7 100755
--- a/zconf/lsluns
+++ b/zconf/lsluns
@@ -45,16 +45,16 @@ sub list_luns
next;
}
if (!defined($lun_hash{$a}{$p})) {
- `echo $wlun >> $drv_dir/$a/$p/unit_add 2>/dev/null`;
+ `echo $lun0 >> $drv_dir/$a/$p/unit_add 2>/dev/null`;
select(undef, undef, undef, 0.1);
%lun_hash = get_lun_hash();
if (!defined($lun_hash{$a}{$p})) {
- `echo $wlun >> $drv_dir/$a/$p/unit_remove 2>/dev/null`;
- `echo $lun0 >> $drv_dir/$a/$p/unit_add 2>/dev/null`;
+ `echo $lun0 >> $drv_dir/$a/$p/unit_remove 2>/dev/null`;
+ `echo $wlun >> $drv_dir/$a/$p/unit_add 2>/dev/null`;
select(undef, undef, undef, 0.1);
%lun_hash = get_lun_hash();
if (!defined($lun_hash{$a}{$p})) {
- `echo $lun0 >> $drv_dir/$a/$p/unit_remove 2>/dev/null`;
+ `echo $wlun >> $drv_dir/$a/$p/unit_remove 2>/dev/null`;
print"\tat port $p:\n";
print "\t\tCannot attach WLUN / LUN0 for scanning.\n";
next;
@@ -92,6 +92,8 @@ sub list_luns
}
}
+# Look only for LUN0 and the REPORT LUNs WLUN. SAM specifies that the storage
+# only has to response on one of those to the REPORT LUNs command.
sub get_lun_hash
{
my %lun_hash;
@@ -105,7 +107,9 @@ sub get_lun_hash
$p =~ s/(0x\w{16})*\n/$1/;
chomp($a);
- $lun_hash{$a}{$p}{$l} = ${[split('/', $device)]}[-1];
+ if ($l eq $lun0 or $l eq $wlun) {
+ $lun_hash{$a}{$p}{$l} = ${[split('/', $device)]}[-1];
+ }
}
return %lun_hash;
}
--
1.7.3.5

View File

@ -0,0 +1,39 @@
From 7fd37ae55c104cf62f8d62da79d89a4c59087a6d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dan=20Hor=C3=A1k?= <dan@danny.cz>
Date: Fri, 28 Jan 2011 14:31:06 +0100
Subject: [PATCH 61/61] lsluns: Accept uppercase and lowercase hex digits
Description: lsluns: Accept uppercase and lowercase hex digits
Symptom: lsluns does not accept uppercase letters in hex-digits for
FCP device id and WWPN.
Problem: lsluns compares the FCP device id and the WWPN with the
sysfs entries that are always lowercase.
Solution: Convert the input from the command line to lowercase, so
that lsluns accepts both, uppercase and lowercase for the
hex digits in the FCP device and the WWPN.
---
zconf/lsluns | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/zconf/lsluns b/zconf/lsluns
index acbdcd7..436ea34 100755
--- a/zconf/lsluns
+++ b/zconf/lsluns
@@ -252,7 +252,14 @@ GetOptions('c|ccw=s' => \@adapter,
};
@adapter = split(',', join(',', @adapter));
+foreach (@adapter) {
+ $_ =~ tr/A-Z/a-z/;
+}
+
@port = split(',', join(',', @port));
+foreach (@port) {
+ $_ =~ tr/A-Z/a-z/;
+}
%res_hash = get_env_list(\@adapter, \@port);
--
1.7.3.5

View File

@ -0,0 +1,225 @@
From 9e35e49ec56880c9f62cce2ff79849e1e409bc2b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dan=20Hor=C3=A1k?= <dan@danny.cz>
Date: Mon, 14 Feb 2011 11:03:03 +0100
Subject: [PATCH] dumpconf: Add DELAY_MINUTES description to man page
Description: dumpconf: Add DELAY_MINUTES description to man page
Symptom: User has no online documentation for the DELAY_MINUTES keyword.
Problem: Description of the DELAY_MINUTES keyword is missing in dumpconf
man page.
Solution: Add description of DELAY_MINUTES keyword to dumpconf man page.
Also add some minor man page cleanups from upstream version.
---
man/dumpconf.8 | 104 +++++++++++++++++++++++--------------------------------
1 files changed, 44 insertions(+), 60 deletions(-)
diff --git a/man/dumpconf.8 b/man/dumpconf.8
index b8dcd00..c795568 100644
--- a/man/dumpconf.8
+++ b/man/dumpconf.8
@@ -1,7 +1,7 @@
-.TH DUMPCONF 8 "Nov 2006" "s390-tools"
+.TH DUMPCONF 8 "Nov 2009" "s390-tools"
.SH NAME
-dumpconf \- Configure automatic dump for Linux on z/Series.
+dumpconf \- Configure an ON_PANIC action for Linux on System z.
.SH SYNOPSIS
.br
@@ -10,8 +10,8 @@ dumpconf \- Configure automatic dump for Linux on z/Series.
\fBdumpconf\fR [-h|-v]
.SH DESCRIPTION
-\fBdumpconf\fR reads /etc/sysconfig/dumpconf and initializes the automatic dump
-feature according to the configuration file.
+\fBdumpconf\fR reads the /etc/sysconfig/dumpconf file
+and establishes the action to be taken in case a kernel panic occurs.
The following keywords can be used in the dumpconf file:
@@ -20,21 +20,22 @@ The following keywords can be used in the dumpconf file:
Shutdown action in case of a kernel panic. Possible values are 'dump', 'reipl', 'dump_reipl', 'stop' and 'vmcmd':
.br
-dump: trigger dump according to configuration in /etc/sysconfig/dumpconf.
+dump: trigger dump according to the configuration in /etc/sysconfig/dumpconf.
.br
-reipl: trigger re-IPL according to configuration under /sys/firmware/reipl.
+reipl: trigger re-IPL according to the configuration under /sys/firmware/reipl.
.br
-dump_reipl: first trigger dump according to configuration in
-/etc/sysconfig/dumpconf, then trigger re-IPL according to configuration under
-/sys/firmware/reipl.
+dump_reipl: first trigger dump according to the configuration in
+/etc/sysconfig/dumpconf, then trigger re-IPL according to the configuration
+under /sys/firmware/reipl.
.br
stop: stop Linux and enter disabled wait (default).
.br
-vmcmd: trigger vm command according to 'VMCMD_X' configuration in /etc/sysconfig/dumpconf.
+vmcmd: trigger CP command according to the 'VMCMD_X' configuration in
+/etc/sysconfig/dumpconf.
.TP
\fB - DUMP_TYPE:\fR
@@ -46,15 +47,15 @@ Device number of dump device.
.TP
\fB - WWPN\fR
-WWPN for scsi dump device.
+WWPN for SCSI dump device.
.TP
\fB - LUN\fR
-LUN for scsi dump device.
+LUN for SCSI dump device.
.TP
\fB - BOOTPROG:\fR
-Boot program selector
+Boot program selector.
.TP
\fB - BR_LBA:\fR
@@ -64,46 +65,25 @@ Boot record logical block address.
\fB - VMCMD_1, VMCMD_2 ... VMCMD_5:\fR
Up to five CP commands, which are triggered in case of a kernel panic.
-.SH Reboot loop considerations
-
-If you select the shutdown actions "reipl" or "dump_reipl", in rare cases a
-"reboot loop" can occur, if the Linux kernel crashes everytime after the
-reboot. If you want to prevent that scenario, one of the following two
-approaches can be taken:
-
-1. Manual activation of dumpconf
-
-Ensure that the dumpconf service is not active by default:
-.br
-# chkconfig --del dumpconf
-
-Start dumpconf service manually:
-.br
-# service dumpconf start
-
-When your Linux system crashes, the system will be rebooted (after creating
-a dump in case of dump_reipl). Because the dumpconf script will then not be
-activated automatically, a second crash will stop the system.
-
-2. Automatic delayed activation of dumpconf
-
-Ensure that the dumpconf service is not active by default:
-.br
-# chkconfig --del dumpconf
-
-To enable delayed activation one of the following methods can be used:
- a) Use a init script (e.g. /etc/rc.d/boot.local):
- (sleep 10m; /sbin/service dumpconf start) &
-
- b) Use a init script (e.g. /etc/rc.d/boot.local) together with "at":
- echo 'echo /sbin/service dumpconf start' |at now+10min
-
- c) Use the following crontab entry:
- @reboot sleep 10m && /sbin/service dumpconf start
-
-In these examples, when your Linux system crashes within 10 minutes after
-the reboot, the dumpconf script is not active and a second crash will stop
-the system.
+.TP
+\fB - DELAY_MINUTES:\fR
+Number of minutes the activation of dumpconf is to be delayed. If this keyword
+is omitted, the default is zero, which means that
+dumpconf activates immediately during system startup.
+Specify a non-zero delay time only if you specified
+shutdown action "reipl" or "dump_reipl".
+These actions might cause a reboot loop
+if the Linux kernel crashes persistently during (or shortly after) each reboot.
+
+A non-zero delay time causes dumpconf to sleep in the background until the
+delay time has expired. In this case messages are written to /var/log/messages.
+By default (DELAY_MINUTES is omitted or zero) dumpconf runs in the foreground
+and informational messages are written to sysout, while
+error messages are written to syserr.
+
+Example: If you specified DELAY_MINUTES=10 and
+your Linux system crashes within 10 minutes after the reboot,
+then dumpconf is not yet active and the default action (stop) is triggered.
.SH COMMANDS
.TP
@@ -128,12 +108,12 @@ Print usage information, then exit.
Print version information, then exit.
.SH EXAMPLES:
-The following are examples for /etc/sysconfig/dumpconf:
+The following are examples of the /etc/sysconfig/dumpconf file:
.br
#
.br
-# Example config for CCW dump device (DASD)
+# Example configuration for a CCW dump device (DASD)
.br
#
.br
@@ -141,12 +121,14 @@ ON_PANIC=dump_reipl
.br
DUMP_TYPE=ccw
.br
-DEVICE=0.0.4714
+DEVICE=0.0.1234
+.br
+DELAY_MINUTES=5
.br
#
.br
-# Example config for FCP dump device (SCSI Disk)
+# Example configuration for an FCP dump device (SCSI Disk)
.br
#
.br
@@ -154,7 +136,7 @@ ON_PANIC=dump
.br
DUMP_TYPE=fcp
.br
-DEVICE=0.0.4711
+DEVICE=0.0.2345
.br
WWPN=0x5005076303004712
.br
@@ -167,7 +149,7 @@ BR_LBA=0
#
.br
-# Example config for vm command on panic
+# Example configuration for CP commands on panic
.br
#
.br
@@ -177,7 +159,7 @@ VMCMD_1="MESSAGE * Starting VMDUMP"
.br
VMCMD_2="VMDUMP"
.br
-VMCMD_3="IPL 4711"
+VMCMD_3="IPL 3456"
#
.br
@@ -186,6 +168,8 @@ VMCMD_3="IPL 4711"
#
.br
ON_PANIC=reipl
+.br
+DELAY_MINUTES=5
.SH SEE ALSO
Linux on zSeries: Using the Dump Tools
--
1.7.4

View File

@ -0,0 +1,164 @@
From c55983415ae3bd360deb04ede20bc482bd2c41b7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dan=20Hor=C3=A1k?= <dan@danny.cz>
Date: Mon, 7 Mar 2011 15:13:45 +0100
Subject: [PATCH] cmsfs-fuse: fix read and write errors in text mode
Description: cmsfs-fuse: fix read and write errors in text mode.
Symptom: Copying a file in text mode fails with read or write errors.
Problem: Miscalculation of file size in text mode and off-by-one error
in record length check for fixed files.
Solution: Correct the calculation of the file size by using the displacement
value for the last block of a variable file and by limiting
the size of the last record of a fixed file to the actual size.
Additionally scan for the correct length of a fixed record in text
mode.
Problem-ID: 70230
---
cmsfs-fuse/cmsfs-fuse.c | 67 ++++++++++++++++++++++++++---------------------
cmsfs-fuse/dasd.c | 2 +-
2 files changed, 38 insertions(+), 31 deletions(-)
diff --git a/cmsfs-fuse/cmsfs-fuse.c b/cmsfs-fuse/cmsfs-fuse.c
index 6c5b0b5..fd87774 100644
--- a/cmsfs-fuse/cmsfs-fuse.c
+++ b/cmsfs-fuse/cmsfs-fuse.c
@@ -917,6 +917,33 @@ static void set_record_extension(struct file *f, int *record, off_t addr,
f->record_scan_state = RSS_DATA_BLOCK_EXT;
}
+/* check for file end via byte count and return count of bytes left */
+static size_t crop_file_end(struct file *f, int record, size_t done,
+ int first)
+{
+ size_t filesize = f->fst->nr_records * f->fst->record_len;
+ struct record *rec = &f->rlist[record];
+ struct record_ext *rext = rec->ext;
+
+ /* done already includes the complete record length incl. extensions */
+ done -= rec->total_len;
+ /* remove possible linefeeds before comparing with on-disk file size */
+ if (f->linefeed && record)
+ done -= record;
+ done += rec->first_block_len;
+
+ /* add length of all existing extensions */
+ while (rext != NULL) {
+ done += rext->len;
+ rext = rext->next;
+ }
+
+ if (done + first > filesize)
+ first = filesize - done;
+ return first;
+}
+
+/* check for file end by record number */
static int end_of_file(struct file *f, int record)
{
if (record == f->fst->nr_records)
@@ -936,6 +963,8 @@ static void walk_fixed_data_block(struct file *f, off_t addr, int *record,
if (first) {
BUG(first > left);
+
+ first = crop_file_end(f, *record, *total, first);
set_record_extension(f, record, addr, first, block);
left -= first;
if (addr != NULL_BLOCK)
@@ -1572,28 +1601,6 @@ static ssize_t get_file_size_fixed(struct fst_entry *fst)
return fst->nr_records * fst->record_len;
}
-static ssize_t get_file_size_variable_slow(struct fst_entry *fst)
-{
- struct record *rec;
- ssize_t total = 0;
- int rc = 0;
- struct file *f = create_file_object(fst, &rc);
-
- if (f == NULL)
- return rc;
-
- rec = get_record(f, f->fst->nr_records - 1);
- total = rec->file_start + rec->total_len;
-
- /*
- * Note: need to add header bytes since the record information does
- * not contain them but get_file_size_logical will remove them...
- */
- total += f->fst->nr_records * VAR_RECORD_HEADER_SIZE;
- destroy_file_object(f);
- return total;
-}
-
static ssize_t get_file_size_variable(struct fst_entry *fst)
{
struct var_ptr vptr;
@@ -1608,11 +1615,11 @@ static ssize_t get_file_size_variable(struct fst_entry *fst)
return rc;
if (vptr.next == 0) {
/*
- * Last block is a null block. Cannot scan that block,
- * need to scan the whole file instead...
+ * Last block is a null block. No more records can
+ * follow, so the displacement value points to EOF.
*/
- total = get_file_size_variable_slow(fst);
- goto skip;
+ total = vptr.disp;
+ goto skip_scan;
}
ptr = ABS(vptr.next);
if (vptr.disp != VAR_RECORD_SPANNED) {
@@ -1638,7 +1645,6 @@ skip_scan:
*/
if (fst->nr_blocks)
total += (fst->nr_blocks - 1) * cmsfs.blksize;
-skip:
return total;
}
@@ -3896,7 +3902,8 @@ static int do_write(struct file *f, const char *buf, size_t size, off_t offset)
return rc;
f->ptr_dirty = 0;
} else
- if (f->fst->levels > 0) {
+ if (f->fst->levels > 0 &&
+ f->fst->record_format == RECORD_LEN_VARIABLE) {
rc = update_last_block_vptr(f, ABS(f->fst->fop),
f->fst->levels, &vptr);
if (rc < 0)
@@ -3962,7 +3969,7 @@ static int cmsfs_write(const char *path, const char *buf, size_t size,
return do_write(f, buf, size, offset);
/* remove already comitted bytes */
- offset -= f->wcache_used;
+ offset -= f->wcache_commited;
/* write offset must be at the end of the file */
if (offset + f->null_records + f->pad_bytes != f->session_size)
@@ -3981,7 +3988,7 @@ static int cmsfs_write(const char *path, const char *buf, size_t size,
return -EINVAL;
} else {
if (f->fst->record_format == RECORD_LEN_FIXED &&
- f->wcache_commited + scan_len >= f->fst->record_len) {
+ f->wcache_commited + scan_len > f->fst->record_len) {
purge_wcache(f);
return -EINVAL;
}
diff --git a/cmsfs-fuse/dasd.c b/cmsfs-fuse/dasd.c
index d79d34d..1b9af9a 100644
--- a/cmsfs-fuse/dasd.c
+++ b/cmsfs-fuse/dasd.c
@@ -196,7 +196,7 @@ int get_device_info(struct cmsfs *cmsfs)
*/
fd = open(cmsfs->device, O_RDWR);
if (fd < 0) {
- if (errno == EROFS) {
+ if (errno == EROFS || errno == EACCES) {
cmsfs->readonly = 1;
fd = open(cmsfs->device, O_RDONLY);
if (fd < 0)
--
1.7.4

View File

@ -0,0 +1,25 @@
From c4a38de57376a6ddf03906afeac142525837aab0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dan=20Hor=C3=A1k?= <dan@danny.cz>
Date: Fri, 18 Mar 2011 16:35:17 +0100
Subject: [PATCH 64/66] switch to using udevadm settle
---
etc/init.d/mon_statd | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/etc/init.d/mon_statd b/etc/init.d/mon_statd
index 60bcf00..b6699c7 100755
--- a/etc/init.d/mon_statd
+++ b/etc/init.d/mon_statd
@@ -39,7 +39,7 @@ load_kernel_module()
if [ $? -ne 0 ]; then
exit 1
fi
- udevsettle
+ udevadm settle
if [ $? -ne 0 ]; then
exit 1
fi
--
1.7.4

View File

@ -0,0 +1,30 @@
From 983f8cd4337de2ca5377ed64121c55d27367beca Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dan=20Hor=C3=A1k?= <dan@danny.cz>
Date: Fri, 18 Mar 2011 16:37:15 +0100
Subject: [PATCH 65/66] hyptop: Fix man page typo for "current weight"
Description: hyptop: Fix man page typo for "current weight"
Symptom: The hyptop man page says that the 't' character is used for
"current weight" under z/VM.
Problem: The correct character for "current weight" is 'r'.
Solution: Document the correct character 'r' for "current weight".
---
hyptop/hyptop.8 | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/hyptop/hyptop.8 b/hyptop/hyptop.8
index 99a729c..325613b 100644
--- a/hyptop/hyptop.8
+++ b/hyptop/hyptop.8
@@ -127,7 +127,7 @@ The following fields are available under z/VM:
'u' - Used memory
'a' - Maximum memory
'n' - Minimum weight
- 't' - Current weight
+ 'r' - Current weight
'x' - Maximum weight
In "sys" window:
--
1.7.4

View File

@ -0,0 +1,61 @@
From f5a80bd5d3d478354d6044b6d2b9951fd29a8d59 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dan=20Hor=C3=A1k?= <dan@danny.cz>
Date: Fri, 18 Mar 2011 16:37:54 +0100
Subject: [PATCH 66/66] fdasd: buffer overflow when writing to read-only device
Description: fdasd: buffer overflow when writing to read-only device
Symptom: When fdasd tries to write to a read-only disk, it fails with
a '*** buffer overflow detected ***' error message.
Problem: It is expected that fdasd cannot write to a read-only disk, and
such an operation should end with a proper error message. The
libvtoc code, which writes this message, contains the bug that
causes the buffer overflow.
Solution: Directly print the error message, without formatting it first in
a buffer.
---
libvtoc/vtoc.c | 15 +++++----------
1 files changed, 5 insertions(+), 10 deletions(-)
diff --git a/libvtoc/vtoc.c b/libvtoc/vtoc.c
index 36269a4..ae1de8c 100644
--- a/libvtoc/vtoc.c
+++ b/libvtoc/vtoc.c
@@ -146,30 +146,25 @@ static char buffer[85];
*/
static void vtoc_error(enum failure why, char *s1, char *s2)
{
- char error[LINE_LENGTH];
-
switch (why) {
case unable_to_open:
- sprintf(error, "%s opening device '%s' failed.\n%s\n",
+ fprintf(stderr, "\n%s opening device '%s' failed.\n%s\n",
VTOC_ERROR, s1, s2);
break;
case unable_to_seek:
- sprintf(error, "%s seeking device '%s' failed.\n%s\n",
+ fprintf(stderr, "\n%s seeking device '%s' failed.\n%s\n",
VTOC_ERROR, s1, s2);
break;
case unable_to_write:
- sprintf(error, "%s writing to device '%s' failed,\n%s\n",
+ fprintf(stderr, "\n%s writing to device '%s' failed,\n%s\n",
VTOC_ERROR, s1, s2);
break;
case unable_to_read:
- sprintf(error, "%s reading from device '%s' failed.\n%s\n",
+ fprintf(stderr, "\n%s reading from device '%s' failed.\n%s\n",
VTOC_ERROR, s1, s2);
break;
- default: sprintf(error, "Fatal error\n");
+ default: fprintf(stderr, "\nFatal error\n");
}
-
- fputc('\n', stderr);
- fputs(error, stderr);
exit(1);
}
--
1.7.4

View File

@ -0,0 +1,31 @@
From 25442f958a12b428b7d063b927ac48965dcd8164 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dan=20Hor=C3=A1k?= <dan@danny.cz>
Date: Fri, 28 Jan 2011 16:11:19 +0100
Subject: [PATCH] use detected filesystem block size on FBA devices
If a FBA device is not properly formated, then the CMS file system can
have a different block size. The cmsfs tools were able to detect the file
system block size, but in fact they still used default 512 instead. And
using the default was causing crashes. Now the detected value is used.
https://bugzilla.redhat.com/show_bug.cgi?id=651012
---
cmsfsany.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/cmsfsany.c b/cmsfsany.c
index 55bcfdc..18efffb 100644
--- a/cmsfsany.c
+++ b/cmsfsany.c
@@ -102,7 +102,7 @@ int cmsfs_find_label(struct CMSSUPER *vol,struct CMSFSADT *adt)
cmsfs_error(cmsfs_ermsg);
}
vol->flags = CMSFSFBA;
- vol->blksz = 512;
+ vol->blksz = blksz;
return vol->blksz;
} }
--
1.7.3.5

View File

@ -1,25 +0,0 @@
diff -up lib-zfcp-hbaapi-2.0/Makefile.am.orig lib-zfcp-hbaapi-2.0/Makefile.am
--- lib-zfcp-hbaapi-2.0/Makefile.am.orig 2009-11-05 17:22:58.000000000 +0100
+++ lib-zfcp-hbaapi-2.0/Makefile.am 2009-11-09 14:07:17.000000000 +0100
@@ -66,6 +66,9 @@ libzfcphbaapi_la_LDFLAGS = \
-lpthread -Wl,-init,_initvlib,-fini,_finivlib \
-export-symbols $(SYMFILE)
+if VENDORLIB
+libzfcphbaapi_la_LDFLAGS += -module -avoid-version -release $(VERSION)
+endif
if DOCS
man_MANS = libzfcphbaapi.3 dox/man/man3/SupportedHBAAPIs.3 \
diff -up lib-zfcp-hbaapi-2.0/Makefile.in.orig lib-zfcp-hbaapi-2.0/Makefile.in
--- lib-zfcp-hbaapi-2.0/Makefile.in.orig 2009-11-09 14:06:58.000000000 +0100
+++ lib-zfcp-hbaapi-2.0/Makefile.in 2009-11-09 14:08:40.000000000 +0100
@@ -254,6 +254,8 @@ libzfcphbaapi_la_LDFLAGS = \
-lpthread -Wl,-init,_initvlib,-fini,_finivlib \
-export-symbols $(SYMFILE)
+@VENDORLIB_TRUE@libzfcphbaapi_la_LDFLAGS += -module -avoid-version -release $(VERSION)
+
@DOCS_FALSE@man_MANS = libzfcphbaapi.3
@DOCS_TRUE@man_MANS = libzfcphbaapi.3 dox/man/man3/SupportedHBAAPIs.3 \
@DOCS_TRUE@ dox/man/man3/UnSupportedHBAAPIs.3 dox/man/man3/hbaapi.h.3

View File

@ -1,36 +0,0 @@
diff -Nrup lib-zfcp-hbaapi-2.0.orig/Makefile.am lib-zfcp-hbaapi-2.0/Makefile.am
--- lib-zfcp-hbaapi-2.0.orig/Makefile.am 2008-11-21 15:08:13.000000000 +0100
+++ lib-zfcp-hbaapi-2.0/Makefile.am 2009-09-25 12:30:07.000000000 +0200
@@ -60,7 +60,7 @@ lib_LTLIBRARIES = libzfcphbaapi.la
libzfcphbaapi_la_SOURCES = vlib.c vlib_callbacks.c vlib_aux.c vlib_sysfs.c \
vlib_sg.c
-libzfcphbaapi_la_LIBADD = -lsysfs -lsgutils
+libzfcphbaapi_la_LIBADD = -lsysfs -lsgutils2
libzfcphbaapi_la_LDFLAGS = \
-version-info $(LIB_CURRENT):$(LIB_REVISION):$(LIB_AGE) \
-lpthread -Wl,-init,_initvlib,-fini,_finivlib \
diff -Nrup lib-zfcp-hbaapi-2.0.orig/Makefile.in lib-zfcp-hbaapi-2.0/Makefile.in
--- lib-zfcp-hbaapi-2.0.orig/Makefile.in 2008-11-21 15:08:18.000000000 +0100
+++ lib-zfcp-hbaapi-2.0/Makefile.in 2009-09-25 13:22:04.000000000 +0200
@@ -248,7 +248,7 @@ lib_LTLIBRARIES = libzfcphbaapi.la
libzfcphbaapi_la_SOURCES = vlib.c vlib_callbacks.c vlib_aux.c vlib_sysfs.c \
vlib_sg.c
-libzfcphbaapi_la_LIBADD = -lsysfs -lsgutils
+libzfcphbaapi_la_LIBADD = -lsysfs -lsgutils2
libzfcphbaapi_la_LDFLAGS = \
-version-info $(LIB_CURRENT):$(LIB_REVISION):$(LIB_AGE) \
-lpthread -Wl,-init,_initvlib,-fini,_finivlib \
diff -Nrup lib-zfcp-hbaapi-2.0.orig/vlib_sg.c lib-zfcp-hbaapi-2.0/vlib_sg.c
--- lib-zfcp-hbaapi-2.0.orig/vlib_sg.c 2008-11-20 10:23:34.000000000 +0100
+++ lib-zfcp-hbaapi-2.0/vlib_sg.c 2009-09-25 13:21:52.000000000 +0200
@@ -19,6 +19,8 @@
* @brief All calls that use sg_utils library.
*/
+#include <scsi/sg_lib.h>
+#include <scsi/sg_cmds.h>
#include "vlib.h"
#define INTERVAL 10000000

View File

@ -0,0 +1,26 @@
diff -up lib-zfcp-hbaapi-2.1/Makefile.am.module lib-zfcp-hbaapi-2.1/Makefile.am
--- lib-zfcp-hbaapi-2.1/Makefile.am.module 2010-07-21 09:55:20.000000000 +0200
+++ lib-zfcp-hbaapi-2.1/Makefile.am 2011-01-14 10:42:06.000000000 +0100
@@ -69,6 +69,10 @@ libzfcphbaapi_la_LDFLAGS = \
-lpthread -Wl,-init,_initvlib,-fini,_finivlib \
-export-symbols $(SYMFILE)
+if VENDORLIB
+libzfcphbaapi_la_LDFLAGS += -module -avoid-version -release $(VERSION)
+endif
+
bin_PROGRAMS = zfcp_ping zfcp_show
zfcp_ping_SOURCES = fc_tools/zfcp_ping.c
diff -up lib-zfcp-hbaapi-2.1/Makefile.in.module lib-zfcp-hbaapi-2.1/Makefile.in
--- lib-zfcp-hbaapi-2.1/Makefile.in.module 2010-09-17 13:17:17.000000000 +0200
+++ lib-zfcp-hbaapi-2.1/Makefile.in 2011-01-14 10:42:44.000000000 +0100
@@ -279,6 +279,8 @@ libzfcphbaapi_la_LDFLAGS = \
-lpthread -Wl,-init,_initvlib,-fini,_finivlib \
-export-symbols $(SYMFILE)
+@VENDORLIB_TRUE@libzfcphbaapi_la_LDFLAGS += -module -avoid-version -release $(VERSION)
+
zfcp_ping_SOURCES = fc_tools/zfcp_ping.c
zfcp_ping_LDADD = -lzfcphbaapi
zfcp_show_SOURCES = fc_tools/zfcp_show.c

View File

@ -0,0 +1,13 @@
diff -up lib-zfcp-hbaapi-2.1/vlib_sg_io.c.u8 lib-zfcp-hbaapi-2.1/vlib_sg_io.c
--- lib-zfcp-hbaapi-2.1/vlib_sg_io.c.u8 2011-01-14 11:57:51.000000000 +0100
+++ lib-zfcp-hbaapi-2.1/vlib_sg_io.c 2011-01-14 11:58:05.000000000 +0100
@@ -24,6 +24,9 @@
#include <sys/types.h>
#include <sys/ioctl.h>
#include <sys/time.h>
+
+typedef __u8 u8;
+
#include <scsi/scsi.h>
#include <scsi/sg.h>

View File

@ -0,0 +1,37 @@
diff -up lib-zfcp-hbaapi-2.1/Makefile.am.vendorlib lib-zfcp-hbaapi-2.1/Makefile.am
--- lib-zfcp-hbaapi-2.1/Makefile.am.vendorlib 2011-01-14 12:10:56.000000000 +0100
+++ lib-zfcp-hbaapi-2.1/Makefile.am 2011-01-14 12:12:02.000000000 +0100
@@ -76,9 +76,15 @@ endif
bin_PROGRAMS = zfcp_ping zfcp_show
zfcp_ping_SOURCES = fc_tools/zfcp_ping.c
-zfcp_ping_LDADD = -lzfcphbaapi
zfcp_show_SOURCES = fc_tools/zfcp_show.c
+
+if VENDORLIB
+zfcp_ping_LDADD = -lHBAAPI
+zfcp_show_LDADD = -lHBAAPI
+else
+zfcp_ping_LDADD = -lzfcphbaapi
zfcp_show_LDADD = -lzfcphbaapi
+endif
if DOCS
diff -up lib-zfcp-hbaapi-2.1/Makefile.in.vendorlib lib-zfcp-hbaapi-2.1/Makefile.in
--- lib-zfcp-hbaapi-2.1/Makefile.in.vendorlib 2011-01-14 12:11:01.000000000 +0100
+++ lib-zfcp-hbaapi-2.1/Makefile.in 2011-01-14 12:13:05.000000000 +0100
@@ -282,9 +282,11 @@ libzfcphbaapi_la_LDFLAGS = \
@VENDORLIB_TRUE@libzfcphbaapi_la_LDFLAGS += -module -avoid-version -release $(VERSION)
zfcp_ping_SOURCES = fc_tools/zfcp_ping.c
-zfcp_ping_LDADD = -lzfcphbaapi
zfcp_show_SOURCES = fc_tools/zfcp_show.c
-zfcp_show_LDADD = -lzfcphbaapi
+@VENDORLIB_TRUE@zfcp_ping_LDADD = -lHBAAPI
+@VENDORLIB_TRUE@zfcp_show_LDADD = -lHBAAPI
+@VENDORLIB_FALSE@zfcp_ping_LDADD = -lzfcphbaapi
+@VENDORLIB_FALSE@zfcp_show_LDADD = -lzfcphbaapi
@DOCS_FALSE@man_MANS = zfcp_show.8 zfcp_ping.8 libzfcphbaapi.3
@DOCS_TRUE@man_MANS = libzfcphbaapi.3 dox/man/man3/SupportedHBAAPIs.3 \
@DOCS_TRUE@ dox/man/man3/UnSupportedHBAAPIs.3 dox/man/man3/hbaapi.h.3 \

View File

@ -1,6 +1,6 @@
%define cmsfsver 1.1.8c
%define vipaver 2.0.4
%define hbaapiver 2.0
%define hbaapiver 2.1
%{!?_initddir: %define _initddir %{_initrddir}}
@ -8,7 +8,7 @@ Name: s390utils
Summary: Utilities and daemons for IBM System/z
Group: System Environment/Base
Version: 1.8.2
Release: 30%{?dist}
Release: 31%{?dist}
Epoch: 2
License: GPLv2 and GPLv2+ and CPL
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@ -81,16 +81,41 @@ Patch40: 0040-cpuplugd-set-cpu_min-to-1-by-default.patch
Patch41: 0041-fix-dates-option-on-zfcpdbf.patch
Patch42: 0042-lsluns-uninitialized-value-on-adapter-offline.patch
Patch43: 0043-zfcpdbf-Fix-Use-of-uninitialized-value-and-output-is.patch
Patch44: 0044-xcec-bridge-fix-multicast-forwarding.patch
Patch45: 0045-ziomon-wrong-return-codes.patch
Patch46: 0046-qethconf-process-devices-with-non-zero-subchannel.patch
Patch47: 0047-wait-for-completion-of-any-pending-actions-affecting.patch
Patch48: 0048-add-infrastructure-code-for-new-features.patch
Patch49: 0049-hyptop-Show-hypervisor-performance-data-on-System-z.patch
Patch50: 0050-cmsfs-fuse-support-for-CMS-EDF-filesystems-via-fuse.patch
Patch51: 0051-lsmem-chmem-Tools-to-manage-memory-hotplug.patch
Patch52: 0052-dumpconf-Prevent-re-IPL-loop-for-dump-on-panic.patch
Patch53: 0053-ttyrun-run-a-program-if-a-terminal-device-is-availab.patch
Patch54: 0054-zgetdump-zipl-Add-ELF-dump-support-needed-for-makedu.patch
Patch55: 0055-znetconf-support-for-OSA-CHPID-types-OSX-and-OSM.patch
Patch56: 0056-iucvtty-do-not-specify-z-VM-user-ID-as-argument-to-l.patch
Patch57: 0057-tunedasd-add-new-option-Q-query_reserve.patch
Patch58: 0058-fdasd-dasdfmt-fix-format-7-label.patch
Patch59: 0059-cpuplugd-cmm_pages-not-set-and-restored-correctly.patch
Patch60: 0060-lsluns-Fix-LUN-reporting-for-SAN-volume-controller-S.patch
Patch61: 0061-lsluns-Accept-uppercase-and-lowercase-hex-digits.patch
Patch62: 0062-dumpconf-Add-DELAY_MINUTES-description-to-man-page.patch
Patch63: 0063-cmsfs-fuse-fix-read-and-write-errors-in-text-mode.patch
Patch64: 0064-switch-to-using-udevadm-settle.patch
Patch65: 0065-hyptop-Fix-man-page-typo-for-current-weight.patch
Patch66: 0066-fdasd-buffer-overflow-when-writing-to-read-only-devi.patch
Patch1000: 1000-ziomon-linker.patch
Patch100: cmsfs-1.1.8-warnings.patch
Patch101: cmsfs-1.1.8-kernel26.patch
Patch102: cmsfs-1.1.8-use-detected-filesystem-block-size-on-FBA-devices.patch
Patch200: src_vipa-2.0.4-locations.patch
Patch300: lib-zfcp-hbaapi-2.0-sgutils.patch
Patch301: lib-zfcp-hbaapi-2.0-module.patch
Patch301: lib-zfcp-hbaapi-2.1-module.patch
Patch302: lib-zfcp-hbaapi-2.1-u8.patch
Patch303: lib-zfcp-hbaapi-2.1-vendorlib.patch
Requires: s390utils-base = %{epoch}:%{version}-%{release}
Requires: s390utils-osasnmpd = %{epoch}:%{version}-%{release}
@ -241,6 +266,75 @@ be used together with the zSeries (s390) Linux kernel and device drivers.
# zfcpdbf: Fix 'Use of uninitialized value' and output issues (#612622)
%patch43 -p1 -b .zfcpdbf-uninitialized-value
# xcec-bridge: fix multicast forwarding (#619504)
%patch44 -p1 -b .xcec-bridge-multicast
# ziomon: wrong return codes (#623250)
%patch45 -p1 -b .ziomon-return-codes
# qethconf: process devices with non-zero subchannel (#627692)
%patch46 -p1 -b .qetgconf-nonzero-subchannel
# wait for completion of any pending actions affecting device (#631527)
%patch47 -p1 -b .cio_settle
# add infrastructure code for new features (#631541)
%patch48 -p1 -b .feature-infrastructure
# hyptop: Show hypervisor performance data on System z (#631541)
%patch49 -p1 -b .hyptop
# cmsfs-fuse: support for CMS EDF filesystems via fuse (#631546)
%patch50 -p1 -b .cmsfs-fuse
# lsmem/chmem: Tools to manage memory hotplug (#631561)
%patch51 -p1 -b .lsmem-chmem
# dumpconf: Prevent re-IPL loop for dump on panic (#633411)
%patch52 -p1 -b .dumpconf-reipl
# ttyrun: run a program if a terminal device is available (#633420)
%patch53 -p1 -b .ttyrun
# zgetdump/zipl: Add ELF dump support (needed for makedumpfile) (#633437)
%patch54 -p1 -b .elf-dump
# znetconf: support for OSA CHPID types OSX and OSM (#633534)
%patch55 -p1 -b .znetconf-osx-osm
# iucvtty: do not specify z/VM user ID as argument to login -h (#636204)
%patch56 -p1 -b .iucvtty-login
# tunedasd: add new option -Q / --query_reserve (#644935)
%patch57 -p1 -b .tunedasd-q
# fdasd/dasdfmt: fix format 7 label (#649787)
%patch58 -p1 -b .vtoc-format-7
# cpuplugd: cmm_pages not set and restored correctly (#658517)
%patch59 -p1 -b .cpuplugd-cmm_pages
# lsluns: Fix LUN reporting for SAN volume controller (SVC) (#659828)
%patch60 -p1 -b .lsluns-svc
# lsluns: Accept uppercase and lowercase hex digits (#660361)
%patch61 -p1 -b .lsluns-ignore-case
# dumpconf: Add DELAY_MINUTES description to man page (#676706)
%patch62 -p1 -b .dumpconf-update-man
# cmsfs-fuse: fix read and write errors in text mode (#680465)
%patch63 -p1 -b .cmsfs-fuse-text-mode-errors
# mon_statd: switch to using udevadm settle (#688140)
%patch64 -p1 -b .mon_statd-udevadm-settle
# hyptop: Fix man page typo for "current weight" (#684244)
%patch65 -p1 -b .hyptop-man-page-typo
# fdasd: buffer overflow when writing to read-only device (#688340)
%patch66 -p1 -b .fdasd-buffer-overflow
# Fix linking with --no-add-needed
%patch1000 -p1 -b .linker
@ -253,6 +347,9 @@ pushd cmsfs-%{cmsfsver}
# build on kernel-2.6, too
%patch101 -p1 -b .cmsfs26
# use detected filesystem block size (#651012)
%patch102 -p1 -b .use-detected-block-size
popd
#
@ -267,11 +364,14 @@ popd
# lib-zfcp-hbaapi
#
pushd lib-zfcp-hbaapi-%{hbaapiver}
# fix for newer sg3_utils and missing function declarations
%patch300 -p1 -b .sgutils
# build the library as a module
%patch301 -p1 -b .module
# kernel headers need u8 type
%patch302 -p1 -b .u8
# fix linking of the tools when using vendor library mode
%patch303 -p1 -b .vendorlib
popd
# remove --strip from install
@ -306,10 +406,13 @@ pushd src_vipa-%{vipaver}
make CC_FLAGS="$RPM_OPT_FLAGS -fPIC" LIBDIR=%{_libdir}
popd
%ifarch s390x
pushd lib-zfcp-hbaapi-%{hbaapiver}
%configure --disable-static
export CPPFLAGS=-I/usr/src/kernels/$(rpm -q --qf="%{VERSION}-%{RELEASE}.%{ARCH}" kernel-devel)/include
%configure --disable-static --enable-vendor-lib
make EXTRA_CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
popd
%endif
%install
@ -365,6 +468,7 @@ pushd src_vipa-%{vipaver}
make install LIBDIR=%{_libdir} SBINDIR=%{_bindir} INSTROOT=$RPM_BUILD_ROOT
popd
%ifarch s390x
# lib-zfcp-hbaapi
pushd lib-zfcp-hbaapi-%{hbaapiver}
%makeinstall docdir=$RPM_BUILD_ROOT%{_docdir}/lib-zfcp-hbaapi-%{hbaapiver}
@ -373,6 +477,7 @@ popd
rm -rf $RPM_BUILD_ROOT%{_docdir}/lib-zfcp-hbaapi-%{hbaapiver}/latex
# remove unwanted files
rm -f $RPM_BUILD_ROOT%{_libdir}/libzfcphbaapi.*
%endif
# install usefull headers for devel subpackage
mkdir -p $RPM_BUILD_ROOT%{_includedir}/%{name}
@ -420,6 +525,7 @@ Requires: sg3_utils
Requires(pre): chkconfig
Requires(preun): chkconfig
Requires(preun): initscripts
BuildRequires: ncurses-devel
%description base
@ -525,6 +631,8 @@ s390 base tools. This collection provides the following utilities:
adapters.
- cio_ignore: Query and modify the contents of the CIO device driver
blacklist.
- lsmem: Display the online status of the available memory.
- chmem: Set hotplug memory online or offline.
* dumpconf:
Allows to configure the dump device used for system dump in case a kernel
@ -590,19 +698,23 @@ fi
/sbin/qethconf
/sbin/tape390_display
/sbin/tape390_crypt
/sbin/ttyrun
/sbin/tunedasd
/sbin/vmcp
/sbin/zgetdump
/sbin/znetconf
/sbin/dbginfo.sh
%{_sbindir}/lsmem
%{_sbindir}/lsreipl
%{_sbindir}/lsshut
%{_sbindir}/chmem
%{_sbindir}/chreipl
%{_sbindir}/chshut
%{_sbindir}/ip_watcher.pl
%{_sbindir}/start_hsnc.sh
%{_sbindir}/vmur
%{_sbindir}/xcec-bridge
%{_sbindir}/hyptop
%{_bindir}/vmconvert
%{_initddir}/dumpconf
%config(noreplace) %{_sysconfdir}/sysconfig/dumpconf
@ -612,6 +724,7 @@ fi
%{_mandir}/man5/zipl.conf.5*
%{_mandir}/man8/chccwdev.8*
%{_mandir}/man8/chchp.8*
%{_mandir}/man8/chmem.8*
%{_mandir}/man8/chreipl.8*
%{_mandir}/man8/chshut.8*
%{_mandir}/man8/chzcrypt.8*
@ -621,9 +734,11 @@ fi
%{_mandir}/man8/dasdview.8*
%{_mandir}/man8/dumpconf.8*
%{_mandir}/man8/fdasd.8*
%{_mandir}/man8/hyptop.8*
%{_mandir}/man8/lschp.8*
%{_mandir}/man8/lscss.8*
%{_mandir}/man8/lsdasd.8*
%{_mandir}/man8/lsmem.8*
%{_mandir}/man8/lsluns.8*
%{_mandir}/man8/lsqeth.8*
%{_mandir}/man8/lsreipl.8*
@ -635,6 +750,7 @@ fi
%{_mandir}/man8/qethconf.8*
%{_mandir}/man8/tape390_crypt.8*
%{_mandir}/man8/tape390_display.8*
%{_mandir}/man8/ttyrun.8*
%{_mandir}/man8/tunedasd.8*
%{_mandir}/man8/vmconvert.8*
%{_mandir}/man8/vmcp.8*
@ -806,6 +922,7 @@ Tool set to collect data for zfcp performance analysis and report.
License: GPLv2
Summary: z/VM IUCV terminal applications
Group: Applications/System
Requires(pre): shadow-utils
BuildRequires: gettext
%description iucvterm
@ -860,6 +977,7 @@ fi
#
# *********************** libzfcphbaapi package ***********************
#
%ifarch s390x
%package libzfcphbaapi
License: CPL
Summary: ZFCP HBA API Library -- HBA API for the zfcp device driver
@ -868,6 +986,8 @@ URL: http://www.ibm.com/developerworks/linux/linux390/zfcp-hbaapi.html
BuildRequires: automake autoconf
BuildRequires: doxygen libsysfs-devel
BuildRequires: sg3_utils-devel
BuildRequires: kernel-devel
BuildRequires: libhbaapi-devel
Requires: libhbaapi
Obsoletes: %{name}-libzfcphbaapi-devel < 2:1.8.2-4
@ -883,10 +1003,14 @@ the zfcp device driver.
%doc lib-zfcp-hbaapi-%{hbaapiver}/ChangeLog
%doc lib-zfcp-hbaapi-%{hbaapiver}/AUTHORS
%doc lib-zfcp-hbaapi-%{hbaapiver}/LICENSE
%{_bindir}/zfcp_ping
%{_bindir}/zfcp_show
%{_libdir}/libzfcphbaapi-%{hbaapiver}.so
%{_mandir}/man3/libzfcphbaapi.3*
%{_mandir}/man3/SupportedHBAAPIs.3*
%{_mandir}/man3/UnSupportedHBAAPIs.3*
%{_mandir}/man8/zfcp_ping.8*
%{_mandir}/man8/zfcp_show.8*
%exclude %{_mandir}/man3/hbaapi.h.3*
#
@ -908,6 +1032,8 @@ Documentation for the ZFCP HBA API Library.
%docdir %{_docdir}/lib-zfcp-hbaapi-%{hbaapiver}
%{_docdir}/lib-zfcp-hbaapi-%{hbaapiver}/
%endif
#
# *********************** cmsfs package ***********************
#
@ -934,6 +1060,26 @@ This package contains the CMS file system tools.
%{_mandir}/man8/cmsfslst.8*
%{_mandir}/man8/cmsfsvol.8*
#
# *********************** cmsfs-fuse package ***********************
#
%package cmsfs-fuse
License: GPLv2
Summary: CMS file system based on FUSE
Group: System Environment/Base
BuildRequires: fuse-devel
Requires: fuse
%description cmsfs-fuse
This package contains the CMS file system based on FUSE.
%files cmsfs-fuse
%defattr(-,root,root,-)
%dir %{_sysconfdir}/cmsfs-fuse
%config(noreplace) %{_sysconfdir}/cmsfs-fuse/filetypes.conf
%{_bindir}/cmsfs-fuse
%{_mandir}/man1/cmsfs-fuse.1*
#
# *********************** devel package ***********************
#
@ -951,6 +1097,40 @@ User-space development files for the s390/s390x architecture.
%changelog
* Fri Mar 18 2011 Dan Horák <dhorak@redhat.com> 2:1.8.2-31
- mon_statd: switch to using udevadm settle (#688140)
- hyptop: Fix man page typo for "current weight" (#684244)
- fdasd: buffer overflow when writing to read-only device (#688340)
- cmsfs-fuse: fix read and write errors in text mode (#680465)
- cmsfs-fuse needs fuse (#631546)
- dumpconf: Add DELAY_MINUTES description to man page (#676706)
- iucvterm scriptlet need shadow-utils (#677247)
- use lower-case in udev rules (#597360)
- add support for the 1731/02 OSM/OSX network device (#636849)
- xcec-bridge: fix multicast forwarding (#619504)
- ziomon: wrong return codes (#623250)
- qethconf: process devices with non-zero subchannel (#627692)
- wait for completion of any pending actions affecting device (#631527)
- add infrastructure code for new features (#631541)
- hyptop: Show hypervisor performance data on System z (#631541)
- cmsfs-fuse: support for CMS EDF filesystems via fuse (#631546)
- lsmem/chmem: Tools to manage memory hotplug (#631561)
- dumpconf: Prevent re-IPL loop for dump on panic (#633411)
- ttyrun: run a program if a terminal device is available (#633420)
- zgetdump/zipl: Add ELF dump support (needed for makedumpfile) (#633437)
- znetconf: support for OSA CHPID types OSX and OSM (#633534)
- iucvtty: do not specify z/VM user ID as argument to login -h (#636204)
- tunedasd: add new option -Q / --query_reserve (#644935)
- fdasd/dasdfmt: fix format 7 label (#649787)
- cpuplugd: cmm_pages not set and restored correctly (#658517)
- lsluns: Fix LUN reporting for SAN volume controller (SVC) (#659828)
- lsluns: Accept uppercase and lowercase hex digits (#660361)
- cmsfs: use detected filesystem block size (#651012)
- device_cio_free: use the /proc/cio_settle interface when waiting for devices
- libzfcphbaapi library needs kernel-devel during build and thus is limited to s390x
- libzfcphbaapi library rebased to 2.1 (#633414)
- new zfcp tools added (#633409)
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2:1.8.2-30
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

View File

@ -1,4 +1,4 @@
856ecdd42ad358433eb3fcc886b58a89 s390-tools-1.8.2.tar.bz2
71a8ee5918f2c44c385fcfe8350cdc98 cmsfs-1.1.8c.tar.gz
2cbfffca3f07c61420899f45d221d451 lib-zfcp-hbaapi-2.0.tar.gz
ecf3ff0ac4469db7297ebd6f7607fb48 lib-zfcp-hbaapi-2.1.tar.gz
ba42772e5b305b5e147344442cd70826 src_vipa-2.0.4.tar.gz