summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
authorDavid Zhang <David.Zhang@Sun.COM>2009-11-11 10:47:43 +0800
committerDavid Zhang <David.Zhang@Sun.COM>2009-11-11 10:47:43 +0800
commit5dc9a9865ba3fe32b5a92dcdbc8fbdcdaa98f54f (patch)
tree2a76b1ad2f2d2f11716a40c602217f82425af9c6 /usr/src
parent6d2259e1baf8d4ac11c96570f45ecdcd9771a68d (diff)
downloadillumos-gate-5dc9a9865ba3fe32b5a92dcdbc8fbdcdaa98f54f.tar.gz
6878294 FMA is too aggressive in marking the disk as faulty for zfs relocated the fatal read media error
6895028 libtopo does not work on Netra-X4200-M2 platform 6892864 setserdsuffix() should work with integer type
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/cmd/fm/eversholt/files/common/disk.esc40
-rw-r--r--usr/src/cmd/fm/modules/common/eversholt/eval.c12
-rw-r--r--usr/src/lib/fm/topo/maps/Makefile1
-rw-r--r--usr/src/lib/fm/topo/maps/SUNW,Netra-X4200-M2/Makefile40
-rw-r--r--usr/src/lib/fm/topo/maps/SUNW,Netra-X4200-M2/Netra-X4200-M2-disk-hc-topology.xmlgen69
-rw-r--r--usr/src/lib/fm/topo/maps/i86pc/i86pc-legacy-hc-topology.xml11
-rw-r--r--usr/src/pkgdefs/SUNWfmd/prototype_i3861
7 files changed, 168 insertions, 6 deletions
diff --git a/usr/src/cmd/fm/eversholt/files/common/disk.esc b/usr/src/cmd/fm/eversholt/files/common/disk.esc
index 823c605690..ce2a1d8854 100644
--- a/usr/src/cmd/fm/eversholt/files/common/disk.esc
+++ b/usr/src/cmd/fm/eversholt/files/common/disk.esc
@@ -19,27 +19,43 @@
* CDDL HEADER END
*/
/*
- * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma dictionary "DISK"
-#define P disk
+#define P disk
fru P;
asru P;
/*
- * disk-as-detector: The disk-as-detector DE provides the mapping between
+ * Over all comments for this file:
+ * <disk-as-detector> The disk-as-detector DE provides the mapping between
* ereports generated by a kernel disk driver sd(7D) and resulting faults.
*/
/*
+ * SERD engine for media error fault propagation:
+ *
+ * This strategy is designed to give a file system, like ZFS, the
+ * ability to attempt data recovery/relocation without faulting a disk.
+ * This implementation depends on a file system retry to the same lba
+ * to trigger a fault when recovery/relocation is not possible.
+ *
+ * We let the engine propagate one error only once every 1 minute and then if we
+ * still get 2 or more * errors within 24 hours for the same LBA, there is a fault.
+ */
+engine serd.io.scsi.cmd.disk.dev.rqs.merr@P, N=1, T=24h;
+
+/*
* disk-as-detector: fault events.
*/
event fault.io.scsi.cmd.disk.dev.rqs.derr@P;
-event fault.io.scsi.cmd.disk.dev.rqs.merr@P;
+event fault.io.scsi.cmd.disk.dev.rqs.merr@P,
+ engine=serd.io.scsi.cmd.disk.dev.rqs.merr@P;
+
/*
* The uderr fault will be defined at some future time.
* event fault.io.scsi.cmd.disk.dev.uderr@P;
@@ -96,14 +112,30 @@ prop fault.io.scsi.cmd.disk.dev.rqs.derr@P->
setpayloadprop("asc", payloadprop("asc")) &&
setpayloadprop("ascq", payloadprop("ascq"))};
+/*
+ * Utilize setserdsuffix with specific LBA,
+ * the serd engine would only trigger if the fault recurred on the same LBA
+ */
prop fault.io.scsi.cmd.disk.dev.rqs.merr@P->
ereport.io.scsi.cmd.disk.dev.rqs.merr@P{ DRIVER_ASSESSMENT_FATAL &&
+ setserdsuffix(payloadprop("lba")) &&
setpayloadprop("key", payloadprop("key")) &&
setpayloadprop("asc", payloadprop("asc")) &&
setpayloadprop("ascq", payloadprop("ascq")) &&
setpayloadprop("lba", payloadprop("lba"))};
/*
+ * NOTE: this propagation uses the "may" propagation of eversholt.
+ * The ereport need never exist. It's just a way of making
+ * the diagnosis wait for the within time on that ereport
+ * to complete. Once it has completed the diagnosis continues
+ * even though the dummy ereport didn't occur.
+ */
+event ereport.io.scsi.cmd.disk.dev.rqs.merr.dummy@P {within(60s)};
+prop fault.io.scsi.cmd.disk.dev.rqs.merr@P (0) ->
+ ereport.io.scsi.cmd.disk.dev.rqs.merr.dummy@P;
+
+/*
* The uderr fault will be propagated at some future time.
* prop fault.io.scsi.cmd.disk.dev.uderr@P->
* ereport.io.scsi.cmd.disk.dev.uderr@P{ DRIVER_ASSESSMENT_FATAL };
diff --git a/usr/src/cmd/fm/modules/common/eversholt/eval.c b/usr/src/cmd/fm/modules/common/eversholt/eval.c
index f7bd53227c..54b24f8513 100644
--- a/usr/src/cmd/fm/modules/common/eversholt/eval.c
+++ b/usr/src/cmd/fm/modules/common/eversholt/eval.c
@@ -649,6 +649,18 @@ eval_func(struct node *funcnp, struct lut *ex, struct node *events[],
serdvalp->v = (uintptr_t)stable(buf);
FREE(buf);
}
+ if (funcname == L_setserdsuffix &&
+ serdvalp->t == UINT64) {
+ int len = snprintf(NULL, 0, "%lld",
+ serdvalp->v);
+ char *buf = MALLOC(len + 1);
+
+ (void) snprintf(buf, len + 1, "%lld",
+ serdvalp->v);
+ serdvalp->t = STRING;
+ serdvalp->v = (uintptr_t)stable(buf);
+ FREE(buf);
+ }
if (serdvalp->t == UINT64)
out(O_ALTFP|O_VERB2, " (%llu)", serdvalp->v);
diff --git a/usr/src/lib/fm/topo/maps/Makefile b/usr/src/lib/fm/topo/maps/Makefile
index c22647c404..de6d9f5e0f 100644
--- a/usr/src/lib/fm/topo/maps/Makefile
+++ b/usr/src/lib/fm/topo/maps/Makefile
@@ -45,6 +45,7 @@ i386_SUBDIRS = i86pc \
i386 \
SUNW,Sun-Fire-X4200-Server \
SUNW,Sun-Fire-X4200-M2 \
+ SUNW,Netra-X4200-M2 \
SUNW,Sun-Fire-X4500 \
SUNW,Sun-Fire-X4540 \
SUNW,Sun-Fire-X4600-M2
diff --git a/usr/src/lib/fm/topo/maps/SUNW,Netra-X4200-M2/Makefile b/usr/src/lib/fm/topo/maps/SUNW,Netra-X4200-M2/Makefile
new file mode 100644
index 0000000000..1a84db38f4
--- /dev/null
+++ b/usr/src/lib/fm/topo/maps/SUNW,Netra-X4200-M2/Makefile
@@ -0,0 +1,40 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+
+# NOTE: The name of the xml file we are building is 'platform'
+# specific, but its build is structured as 'arch' specific since
+# 'uname -i' on all x86 platforms returns i86pc.
+
+ARCH = i86pc
+CLASS = arch
+DTDFILE = topology.dtd.1
+TOPOFILE = Netra-X4200-M2-disk-hc-topology.xml
+SRCDIR = ../SUNW,Netra-X4200-M2
+
+PLATFORM = Netra-X4200-M2
+TOPOBASE = ../i86pc/i86pc-hc-topology.xml
+
+include ../Makefile.map
diff --git a/usr/src/lib/fm/topo/maps/SUNW,Netra-X4200-M2/Netra-X4200-M2-disk-hc-topology.xmlgen b/usr/src/lib/fm/topo/maps/SUNW,Netra-X4200-M2/Netra-X4200-M2-disk-hc-topology.xmlgen
new file mode 100644
index 0000000000..90d37aac60
--- /dev/null
+++ b/usr/src/lib/fm/topo/maps/SUNW,Netra-X4200-M2/Netra-X4200-M2-disk-hc-topology.xmlgen
@@ -0,0 +1,69 @@
+#!/usr/local/bin/perl
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+
+$num_bays = 4;
+$bay_label = "HD";
+
+print <<EOF;
+<topology name='disk' scheme='hc'>
+ <range name='bay' min='0' max='3'>
+EOF
+
+$controller = 0;
+for ($bay = 0; $bay < $num_bays; $bay++) {
+ $hpath = "/pci\@79,0/pci1022,7458\@11/pci1000,3060\@2";
+ $tpath = sprintf("/sd\@%x,0", $bay);
+ $apoint = sprintf(":scsi::dsk/c%dt%dd0",
+ $controller + 1, $bay);
+
+ print <<EOF;
+ <node instance='$bay'>
+ <propgroup name='protocol' version='1' name-stability='Private'
+ data-stability='Private'>
+ <propval name='label' type='string' value='$bay_label$bay' />
+ </propgroup>
+ <propgroup name='io' version='1' name-stability='Private'
+ data-stability='Private'>
+ <propval name='ap-path' type='string' value='/devices$hpath$apoint' />
+ </propgroup>
+ <propgroup name='binding' version='1' name-stability='Private'
+ data-stability='Private'>
+ <propval name='occupant-path' type='string'
+ value='$hpath$tpath' />
+ </propgroup>
+ </node>
+EOF
+}
+
+print <<EOF;
+ <dependents grouping='children'>
+ <range name='disk' min='0' max='0'>
+ <enum-method name='disk' version='1' />
+ </range>
+ </dependents>
+ </range>
+</topology>
+EOF
diff --git a/usr/src/lib/fm/topo/maps/i86pc/i86pc-legacy-hc-topology.xml b/usr/src/lib/fm/topo/maps/i86pc/i86pc-legacy-hc-topology.xml
index d6ef9b2e07..00b771f66d 100644
--- a/usr/src/lib/fm/topo/maps/i86pc/i86pc-legacy-hc-topology.xml
+++ b/usr/src/lib/fm/topo/maps/i86pc/i86pc-legacy-hc-topology.xml
@@ -34,7 +34,8 @@
<range name='motherboard' min='0' max='0'>
<node instance='0'>
- <set type='product' setlist='Sun-Fire-X4100-Server|Sun-Fire-X4200-Server|Sun-Fire-X4100-M2|Sun-Fire-X4200-M2|Sun-Fire-X4140|Sun-Fire-X4240|Sun-Fire-X4440|Sun-Fire-X4500|Sun-Fire-X4540|Sun-Fire-X4600-M2'>
+ <set type='product'
+ setlist='Sun-Fire-X4100-Server|Sun-Fire-X4200-Server|Sun-Fire-X4100-M2|Sun-Fire-X4200-M2|Netra-X4200-M2|Sun-Fire-X4140|Sun-Fire-X4240|Sun-Fire-X4440|Sun-Fire-X4500|Sun-Fire-X4540|Sun-Fire-X4600-M2'>
<fac-enum provider='fac_prov_ipmi' />
<propgroup name='protocol' version='1'
name-stability='Private' data-stability='Private' >
@@ -86,7 +87,8 @@
<dependents grouping='children'>
- <set type='product' setlist='Sun-Fire-X4100-Server|Sun-Fire-X4200-Server|Sun-Fire-X4100-M2|Sun-Fire-X4200-M2|Sun-Fire-X4140|Sun-Fire-X4240|Sun-Fire-X4440'>
+ <set type='product'
+ setlist='Sun-Fire-X4100-Server|Sun-Fire-X4200-Server|Sun-Fire-X4100-M2|Sun-Fire-X4200-M2|Netra-X4200-M2|Sun-Fire-X4140|Sun-Fire-X4240|Sun-Fire-X4440'>
<range name='psu' min='0' max='100'>
<enum-method name='ipmi' version='1' />
<propmap name='psu' />
@@ -104,6 +106,11 @@
<propmap name='Sun-Fire-X4200-Server-disk' />
</range>
</set>
+ <set type='product' setlist='Netra-X4200-M2'>
+ <range name='bay' min='0' max='3'>
+ <propmap name='Netra-X4200-M2-disk' />
+ </range>
+ </set>
<set type='product' setlist='default'>
<range name='bay' min='0' max='1024'>
<enum-method name='ses' version='1' />
diff --git a/usr/src/pkgdefs/SUNWfmd/prototype_i386 b/usr/src/pkgdefs/SUNWfmd/prototype_i386
index 764a92f156..6acf321c3f 100644
--- a/usr/src/pkgdefs/SUNWfmd/prototype_i386
+++ b/usr/src/pkgdefs/SUNWfmd/prototype_i386
@@ -92,6 +92,7 @@ f none usr/platform/i86pc/lib/fm/topo/maps/i86pc-legacy-hc-topology.xml 444 root
f none usr/platform/i86pc/lib/fm/topo/maps/psu-hc-topology.xml 444 root bin
f none usr/platform/i86pc/lib/fm/topo/maps/Sun-Fire-X4200-M2-disk-hc-topology.xml 444 root bin
f none usr/platform/i86pc/lib/fm/topo/maps/Sun-Fire-X4200-Server-disk-hc-topology.xml 444 root bin
+f none usr/platform/i86pc/lib/fm/topo/maps/Netra-X4200-M2-disk-hc-topology.xml 444 root bin
f none usr/platform/i86pc/lib/fm/topo/maps/Sun-Fire-X4500-disk-hc-topology.xml 444 root bin
f none usr/platform/i86pc/lib/fm/topo/maps/Sun-Fire-X4540-disk-hc-topology.xml 444 root bin
f none usr/platform/i86pc/lib/fm/topo/maps/Sun-Fire-X4600-M2-disk-hc-topology.xml 444 root bin