diff options
| author | Robert Mustacchi <rm@joyent.com> | 2017-11-02 16:30:37 +0000 |
|---|---|---|
| committer | Robert Mustacchi <rm@joyent.com> | 2017-11-02 16:42:58 +0000 |
| commit | 85d8f2394fabc93b4699fbf13bad4d86221b4c8f (patch) | |
| tree | e8b6a6dff5fdda0acdc6f6f706a02fdca9e60fb3 | |
| parent | 3942697fd5a28d8766c93571074d5704d56fc016 (diff) | |
| download | illumos-joyent-85d8f2394fabc93b4699fbf13bad4d86221b4c8f.tar.gz | |
backout: 8074 need to add FMA event for SSD wearout (needs work)
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
Approved by: Jerry Jelinek <jerry.jelinek@joyent.com>
| -rw-r--r-- | usr/src/cmd/fm/dicts/DISK.dict | 2 | ||||
| -rw-r--r-- | usr/src/cmd/fm/dicts/DISK.po | 17 | ||||
| -rw-r--r-- | usr/src/cmd/fm/eversholt/files/common/disk.esc | 13 | ||||
| -rw-r--r-- | usr/src/cmd/fm/modules/common/disk-monitor/disk_monitor.c | 5 | ||||
| -rw-r--r-- | usr/src/cmd/fm/modules/common/disk-monitor/diskmon_conf.h | 4 | ||||
| -rw-r--r-- | usr/src/cmd/fm/modules/common/disk-transport/disk-transport.conf | 5 | ||||
| -rw-r--r-- | usr/src/cmd/fm/modules/common/disk-transport/disk_transport.c | 35 | ||||
| -rw-r--r-- | usr/src/cmd/fm/modules/common/zfs-retire/zfs-retire.conf | 3 | ||||
| -rw-r--r-- | usr/src/cmd/fm/modules/common/zfs-retire/zfs_retire.c | 9 | ||||
| -rw-r--r-- | usr/src/lib/fm/libdiskstatus/common/ds_impl.h | 5 | ||||
| -rw-r--r-- | usr/src/lib/fm/libdiskstatus/common/ds_scsi.c | 116 | ||||
| -rw-r--r-- | usr/src/lib/fm/libdiskstatus/common/ds_scsi.h | 28 | ||||
| -rw-r--r-- | usr/src/lib/fm/libdiskstatus/common/libdiskstatus.c | 22 | ||||
| -rw-r--r-- | usr/src/uts/common/sys/fm/io/disk.h | 4 | ||||
| -rw-r--r-- | usr/src/uts/common/sys/fm/io/scsi.h | 7 |
15 files changed, 38 insertions, 237 deletions
diff --git a/usr/src/cmd/fm/dicts/DISK.dict b/usr/src/cmd/fm/dicts/DISK.dict index a7f6695193..93df523b9a 100644 --- a/usr/src/cmd/fm/dicts/DISK.dict +++ b/usr/src/cmd/fm/dicts/DISK.dict @@ -1,7 +1,6 @@ # # Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. -# Copyright 2016 Nexenta Systems, Inc. All rights reserved. # # CDDL HEADER START # @@ -33,4 +32,3 @@ fault.io.disk.over-temperature=1 fault.io.disk.self-test-failure=2 fault.io.scsi.cmd.disk.dev.rqs.derr=3 fault.io.scsi.cmd.disk.dev.rqs.merr=4 -fault.io.disk.ssm-wearout=8 diff --git a/usr/src/cmd/fm/dicts/DISK.po b/usr/src/cmd/fm/dicts/DISK.po index 11439f7404..504285915b 100644 --- a/usr/src/cmd/fm/dicts/DISK.po +++ b/usr/src/cmd/fm/dicts/DISK.po @@ -1,7 +1,6 @@ # # Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. -# Copyright 2016 Nexenta Systems, Inc. All rights reserved. # # CDDL HEADER START # @@ -105,19 +104,3 @@ msgid "DISK-8000-4Q.impact" msgstr "It is likely that continued operation will result in data corruption, which may eventually cause the loss of service or the service degradation.\n" msgid "DISK-8000-4Q.action" msgstr "Schedule a repair procedure to replace the affected device. Use 'fmadm faulty' to find the affected disk.\n" -# -# code: DISK-8000-8D -# keys: fault.io.disk.ssm-wearout -# -msgid "DISK-8000-8D.type" -msgstr "Fault" -msgid "DISK-8000-8D.severity" -msgstr "Major" -msgid "DISK-8000-8D.description" -msgstr "A solid state media device is nearing end of life as projected by the manufacturer." -msgid "DISK-8000-8D.response" -msgstr "None." -msgid "DISK-8000-8D.impact" -msgstr "Performance degradation is likely and continued operation of this device will cause drive failure and potential data loss." -msgid "DISK-8000-8D.action" -msgstr "Schedule a repair procedure to replace the affected drive.\nUse fmdump -V -u <EVENT_ID> to identify the drive." diff --git a/usr/src/cmd/fm/eversholt/files/common/disk.esc b/usr/src/cmd/fm/eversholt/files/common/disk.esc index c94a0b675d..f8b04a305e 100644 --- a/usr/src/cmd/fm/eversholt/files/common/disk.esc +++ b/usr/src/cmd/fm/eversholt/files/common/disk.esc @@ -20,7 +20,6 @@ */ /* * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright 2016 Nexenta Systems, Inc. All rights reserved. */ #pragma dictionary "DISK" @@ -45,8 +44,7 @@ asru P; * 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. + * 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; @@ -187,7 +185,6 @@ event fault.io.disk.predictive-failure@P, FITrate=10, FITrate=10, FRU=P, ASRU=P; event fault.io.disk.self-test-failure@P, FITrate=10, FITrate=10, FRU=P, ASRU=P; -event fault.io.disk.ssm-wearout@P; /* * ereports. @@ -195,7 +192,6 @@ event fault.io.disk.ssm-wearout@P; event ereport.io.scsi.disk.over-temperature@P; event ereport.io.scsi.disk.predictive-failure@P; event ereport.io.scsi.disk.self-test-failure@P; -event ereport.io.scsi.disk.ssm-wearout@P; /* * Propagations. @@ -210,10 +206,3 @@ prop fault.io.disk.predictive-failure@P -> ereport.io.scsi.disk.predictive-failure@P { setpayloadprop("asc", payloadprop("additional-sense-code")) && setpayloadprop("ascq", payloadprop("additional-sense-code-qualifier")) }; - -prop fault.io.disk.ssm-wearout@P -> - ereport.io.scsi.disk.ssm-wearout@P { - setpayloadprop("current-wearout-percentage", - payloadprop("current-ssm-wearout")) - && setpayloadprop("threshold-wearout-percentage", - payloadprop("threshold-ssm-wearout")) }; diff --git a/usr/src/cmd/fm/modules/common/disk-monitor/disk_monitor.c b/usr/src/cmd/fm/modules/common/disk-monitor/disk_monitor.c index eb0abde752..167873cd8b 100644 --- a/usr/src/cmd/fm/modules/common/disk-monitor/disk_monitor.c +++ b/usr/src/cmd/fm/modules/common/disk-monitor/disk_monitor.c @@ -22,7 +22,6 @@ /* * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. - * Copyright 2016 Nexenta Systems, Inc. All rights reserved. */ /* @@ -159,10 +158,6 @@ dm_fault_execute_actions(fmd_hdl_t *hdl, diskmon_t *diskp, nvlist_t *nvl) DISK_ERROR_CLASS "." FM_FAULT_DISK_TESTFAIL)) action_prop = DISK_PROP_STFAILACTION; - if (fmd_nvl_class_match(hdl, nvl, - DISK_ERROR_CLASS "." FM_FAULT_SSM_WEAROUT)) - action_prop = DISK_PROP_SSMWEAROUTACTION; - dm_fault_indicator_set(diskp, INDICATOR_ON); if (action_prop != NULL && diff --git a/usr/src/cmd/fm/modules/common/disk-monitor/diskmon_conf.h b/usr/src/cmd/fm/modules/common/disk-monitor/diskmon_conf.h index 93a2655649..4c0a9bec83 100644 --- a/usr/src/cmd/fm/modules/common/disk-monitor/diskmon_conf.h +++ b/usr/src/cmd/fm/modules/common/disk-monitor/diskmon_conf.h @@ -22,12 +22,13 @@ /* * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. - * Copyright 2016 Nexenta Systems, Inc. All rights reserved. */ #ifndef _DISKMOND_CONF_H #define _DISKMOND_CONF_H +#pragma ident "%Z%%M% %I% %E% SMI" + /* * Configuration File data */ @@ -61,7 +62,6 @@ extern "C" { #define DISK_PROP_FRUACTION "fru-update-action" #define DISK_PROP_OTEMPACTION "overtemp-action" #define DISK_PROP_STFAILACTION "selftest-fail-action" -#define DISK_PROP_SSMWEAROUTACTION "ssm-wearout-action" /* Properties for the "ap" subentity */ #define DISK_AP_PROP_APID "path" diff --git a/usr/src/cmd/fm/modules/common/disk-transport/disk-transport.conf b/usr/src/cmd/fm/modules/common/disk-transport/disk-transport.conf index 8872aeeeb5..c8396be904 100644 --- a/usr/src/cmd/fm/modules/common/disk-transport/disk-transport.conf +++ b/usr/src/cmd/fm/modules/common/disk-transport/disk-transport.conf @@ -21,8 +21,5 @@ # # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. -# Copyright 2016 Nexenta Systems, Inc. All rights reserved. # -# -# To disable transport of "high solid state media used %" faults uncomment: -# setprop ignore-ssm-wearout true +#ident "%Z%%M% %I% %E% SMI" diff --git a/usr/src/cmd/fm/modules/common/disk-transport/disk_transport.c b/usr/src/cmd/fm/modules/common/disk-transport/disk_transport.c index 6fdb97c497..e586f714cc 100644 --- a/usr/src/cmd/fm/modules/common/disk-transport/disk_transport.c +++ b/usr/src/cmd/fm/modules/common/disk-transport/disk_transport.c @@ -21,9 +21,10 @@ /* * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. - * Copyright 2016 Nexenta Systems, Inc. All rights reserved. */ +#pragma ident "%Z%%M% %I% %E% SMI" + /* * Disk error transport module * @@ -31,18 +32,17 @@ * and FMA ereports. It is a read-only transport module, and checks for the * following failures: * - * - overtemp - * - predictive failure - * - self-test failure - * - solid state media wearout + * - overtemp + * - predictive failure + * - self-test failure * * These failures are detected via the TOPO_METH_DISK_STATUS method, which * leverages libdiskstatus to do the actual analysis. This transport module is * in charge of the following tasks: * - * - discovering available devices - * - periodically checking devices - * - managing device addition/removal + * - discovering available devices + * - periodically checking devices + * - managing device addition/removal */ #include <ctype.h> @@ -113,6 +113,7 @@ dt_analyze_disk(topo_hdl_t *thp, tnode_t *node, void *arg) char *protocol; int err; disk_monitor_t *dmp = arg; + uint64_t ena; nvpair_t *elem; boolean_t fault; nvlist_t *details; @@ -151,8 +152,10 @@ dt_analyze_disk(topo_hdl_t *thp, tnode_t *node, void *arg) nvlist_free(in); + ena = fmd_event_ena_create(dmp->dm_hdl); + /* - * Check for faults and post ereport(s) if needed + * Add any faults. */ if (nvlist_lookup_nvlist(result, "faults", &faults) == 0 && nvlist_lookup_string(result, "protocol", &protocol) == 0) { @@ -167,15 +170,8 @@ dt_analyze_disk(topo_hdl_t *thp, tnode_t *node, void *arg) &details) != 0) continue; - if (strcmp(nvpair_name(elem), - FM_EREPORT_SCSI_SSMWEAROUT) == 0 && - fmd_prop_get_int32(dmp->dm_hdl, - "ignore-ssm-wearout") == FMD_B_TRUE) - continue; - dt_post_ereport(dmp->dm_hdl, dmp->dm_xprt, protocol, - nvpair_name(elem), - fmd_event_ena_create(dmp->dm_hdl), fmri, details); + nvpair_name(elem), ena, fmri, details); } } @@ -252,7 +248,6 @@ static const fmd_prop_t fmd_props[] = { { "interval", FMD_TYPE_TIME, "1h" }, { "min-interval", FMD_TYPE_TIME, "1min" }, { "simulate", FMD_TYPE_STRING, "" }, - { "ignore-ssm-wearout", FMD_TYPE_BOOL, "false"}, { NULL, 0, NULL } }; @@ -267,7 +262,7 @@ static const fmd_hdl_ops_t fmd_ops = { }; static const fmd_hdl_info_t fmd_info = { - "Disk Transport Agent", "1.1", &fmd_ops, fmd_props + "Disk Transport Agent", "1.0", &fmd_ops, fmd_props }; void @@ -294,7 +289,7 @@ _fmd_init(fmd_hdl_t *hdl) * the developer to substitute a faulty device based off all or part of * an FMRI string. For example, one could do: * - * setprop simulate "bay=4/disk=4 /path/to/sim.so" + * setprop simulate "bay=4/disk=4 /path/to/sim.so" * * When the transport module encounters an FMRI containing the given * string, then it will open the simulator file instead of the diff --git a/usr/src/cmd/fm/modules/common/zfs-retire/zfs-retire.conf b/usr/src/cmd/fm/modules/common/zfs-retire/zfs-retire.conf index 250ce99b8b..39cde90f01 100644 --- a/usr/src/cmd/fm/modules/common/zfs-retire/zfs-retire.conf +++ b/usr/src/cmd/fm/modules/common/zfs-retire/zfs-retire.conf @@ -25,9 +25,6 @@ # # fmd configuration file for the zfs retire agent. # -# To enable automated retire for SSM wearout faults uncomment the line below: -# setprop ssm_wearout_skip_retire false -# subscribe fault.fs.zfs.* subscribe fault.io.* subscribe resource.fs.zfs.removed diff --git a/usr/src/cmd/fm/modules/common/zfs-retire/zfs_retire.c b/usr/src/cmd/fm/modules/common/zfs-retire/zfs_retire.c index 4856676d7d..263b91cc19 100644 --- a/usr/src/cmd/fm/modules/common/zfs-retire/zfs_retire.c +++ b/usr/src/cmd/fm/modules/common/zfs-retire/zfs_retire.c @@ -427,14 +427,6 @@ zfs_retire_recv(fmd_hdl_t *hdl, fmd_event_t *ep, nvlist_t *nvl, &retire) == 0 && retire == 0) continue; - if (fmd_nvl_class_match(hdl, fault, - "fault.io.disk.ssm-wearout") && - fmd_prop_get_int32(hdl, "ssm_wearout_skip_retire") == - FMD_B_TRUE) { - fmd_hdl_debug(hdl, "zfs-retire: ignoring SSM fault"); - continue; - } - /* * While we subscribe to fault.fs.zfs.*, we only take action * for faults targeting a specific vdev (open failure or SERD @@ -569,7 +561,6 @@ static const fmd_hdl_ops_t fmd_ops = { static const fmd_prop_t fmd_props[] = { { "spare_on_remove", FMD_TYPE_BOOL, "true" }, - { "ssm_wearout_skip_retire", FMD_TYPE_BOOL, "true"}, { NULL, 0, NULL } }; diff --git a/usr/src/lib/fm/libdiskstatus/common/ds_impl.h b/usr/src/lib/fm/libdiskstatus/common/ds_impl.h index 8b8132791d..34f8b15d75 100644 --- a/usr/src/lib/fm/libdiskstatus/common/ds_impl.h +++ b/usr/src/lib/fm/libdiskstatus/common/ds_impl.h @@ -21,12 +21,13 @@ /* * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. - * Copyright 2016 Nexenta Systems, Inc. All rights reserved. */ #ifndef _DS_IMPL_H #define _DS_IMPL_H +#pragma ident "%Z%%M% %I% %E% SMI" + #include <dlfcn.h> #include <libnvpair.h> #include <sys/types.h> @@ -52,7 +53,6 @@ struct disk_status { nvlist_t *ds_overtemp; /* overtemp */ nvlist_t *ds_predfail; /* predict fail */ nvlist_t *ds_testfail; /* self test fail */ - nvlist_t *ds_ssmwearout; /* SSM wearout fail */ int ds_error; /* last error */ nvlist_t *ds_state; /* protocol state */ }; @@ -60,7 +60,6 @@ struct disk_status { #define DS_FAULT_OVERTEMP 0x1 #define DS_FAULT_PREDFAIL 0x2 #define DS_FAULT_TESTFAIL 0x4 -#define DS_FAULT_SSMWEAROUT 0x8 extern void dprintf(const char *, ...); extern void ddump(const char *, const void *, size_t); diff --git a/usr/src/lib/fm/libdiskstatus/common/ds_scsi.c b/usr/src/lib/fm/libdiskstatus/common/ds_scsi.c index 081f441dd9..0b80f4d4c2 100644 --- a/usr/src/lib/fm/libdiskstatus/common/ds_scsi.c +++ b/usr/src/lib/fm/libdiskstatus/common/ds_scsi.c @@ -21,9 +21,10 @@ /* * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. - * Copyright 2016 Nexenta Systems, Inc. All rights reserved. */ +#pragma ident "%Z%%M% %I% %E% SMI" + #include <assert.h> #include <errno.h> #include <libdiskstatus.h> @@ -76,8 +77,6 @@ static int logpage_temp_verify(ds_scsi_info_t *, scsi_log_parameter_header_t *, int, nvlist_t *); static int logpage_selftest_verify(ds_scsi_info_t *, scsi_log_parameter_header_t *, int, nvlist_t *); -static int logpage_ssm_verify(ds_scsi_info_t *, - scsi_log_parameter_header_t *, int, nvlist_t *); static int logpage_ie_analyze(ds_scsi_info_t *, scsi_log_parameter_header_t *, int); @@ -85,8 +84,6 @@ static int logpage_temp_analyze(ds_scsi_info_t *, scsi_log_parameter_header_t *, int); static int logpage_selftest_analyze(ds_scsi_info_t *, scsi_log_parameter_header_t *, int); -static int logpage_ssm_analyze(ds_scsi_info_t *, - scsi_log_parameter_header_t *, int); static struct logpage_validation_entry log_validation[] = { { LOGPAGE_IE, LOGPAGE_SUPP_IE, @@ -97,10 +94,7 @@ static struct logpage_validation_entry log_validation[] = { logpage_temp_verify, logpage_temp_analyze }, { LOGPAGE_SELFTEST, LOGPAGE_SUPP_SELFTEST, "self-test", - logpage_selftest_verify, logpage_selftest_analyze }, - { LOGPAGE_SSM, LOGPAGE_SUPP_SSM, - FM_EREPORT_SCSI_SSMWEAROUT, - logpage_ssm_verify, logpage_ssm_analyze } + logpage_selftest_verify, logpage_selftest_analyze } }; #define NLOG_VALIDATION (sizeof (log_validation) / sizeof (log_validation[0])) @@ -763,51 +757,6 @@ logpage_selftest_verify(ds_scsi_info_t *sip, } /* - * Verify the contents of the Solid State Media (SSM) log page. - * As of SBC3r36 SSM log page contains one log parameter: - * "Percentage Used Endurance Indicator" which is mandatory. - * For the verification phase, we sanity check this parameter - * by making sure it's present and it's length is set to 0x04. - */ -static int -logpage_ssm_verify(ds_scsi_info_t *sip, - scsi_log_parameter_header_t *lphp, int log_length, nvlist_t *nvl) -{ - ushort_t param_code; - int i, plen = 0; - - for (i = 0; i < log_length; i += plen) { - lphp = (scsi_log_parameter_header_t *)((char *)lphp + plen); - param_code = BE_16(lphp->lph_param); - - switch (param_code) { - case LOGPARAM_PRCNT_USED: - if (nvlist_add_boolean_value(nvl, - FM_EREPORT_SCSI_SSMWEAROUT, B_TRUE) != 0) - return (scsi_set_errno(sip, EDS_NOMEM)); - if (lphp->lph_length != LOGPARAM_PRCNT_USED_PARAM_LEN) { - if (nvlist_add_uint8(nvl, - "invalid-length", lphp->lph_length) != 0) - return (scsi_set_errno(sip, EDS_NOMEM)); - - dprintf("solid state media logpage bad len\n"); - break; - } - - /* verification succeded */ - return (0); - } - - plen = lphp->lph_length + - sizeof (scsi_log_parameter_header_t); - } - - /* verification failed */ - sip->si_supp_log &= ~LOGPAGE_SUPP_SSM; - return (0); -} - -/* * Load the current IE mode pages */ static int @@ -1196,65 +1145,6 @@ logpage_selftest_analyze(ds_scsi_info_t *sip, scsi_log_parameter_header_t *lphp, } /* - * Analyze the contents of the Solid State Media (SSM) log page's - * "Percentage Used Endurance Indicator" log parameter. - * We generate a fault if the percentage used is equal to or over - * PRCNT_USED_FAULT_THRSH - */ -static int -logpage_ssm_analyze(ds_scsi_info_t *sip, scsi_log_parameter_header_t *lphp, - int log_length) -{ - uint16_t param_code; - scsi_ssm_log_param_t *ssm; - nvlist_t *nvl; - int i, plen = 0; - - assert(sip->si_dsp->ds_overtemp == NULL); - if (nvlist_alloc(&sip->si_dsp->ds_overtemp, NV_UNIQUE_NAME, 0) != 0) - return (scsi_set_errno(sip, EDS_NOMEM)); - nvl = sip->si_dsp->ds_overtemp; - - for (i = 0; i < log_length; i += plen) { - lphp = (scsi_log_parameter_header_t *)((uint8_t *)lphp + plen); - param_code = BE_16(lphp->lph_param); - ssm = (scsi_ssm_log_param_t *)lphp; - - switch (param_code) { - case LOGPARAM_PRCNT_USED: - if (lphp->lph_length != LOGPARAM_PRCNT_USED_PARAM_LEN) - break; - - if ((nvlist_add_uint8(nvl, - FM_EREPORT_PAYLOAD_SCSI_CURSSMWEAROUT, - ssm->ssm_prcnt_used) != 0) || - (nvlist_add_uint8(nvl, - FM_EREPORT_PAYLOAD_SCSI_THRSHSSMWEAROUT, - PRCNT_USED_FAULT_THRSH) != 0)) - return (scsi_set_errno(sip, EDS_NOMEM)); - - if (ssm->ssm_prcnt_used >= PRCNT_USED_FAULT_THRSH) - sip->si_dsp->ds_faults |= DS_FAULT_SSMWEAROUT; - - return (0); - } - - plen = lphp->lph_length + - sizeof (scsi_log_parameter_header_t); - } - - /* - * If we got this far we didn't see LOGPARAM_PRCNT_USED - * which is strange since we verified that it's there - */ - dprintf("solid state media logpage analyze failed\n"); -#if DEBUG - abort(); -#endif - return (scsi_set_errno(sip, EDS_NOT_SUPPORTED)); -} - -/* * Analyze the IE mode sense page explicitly. This is only needed if the IE log * page is not supported. */ diff --git a/usr/src/lib/fm/libdiskstatus/common/ds_scsi.h b/usr/src/lib/fm/libdiskstatus/common/ds_scsi.h index db4ee6d591..6d2648f06b 100644 --- a/usr/src/lib/fm/libdiskstatus/common/ds_scsi.h +++ b/usr/src/lib/fm/libdiskstatus/common/ds_scsi.h @@ -21,12 +21,13 @@ /* * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. - * Copyright 2016 Nexenta Systems, Inc. All rights reserved. */ #ifndef _DS_SCSI_H #define _DS_SCSI_H +#pragma ident "%Z%%M% %I% %E% SMI" + #include <sys/types.h> #include <sys/byteorder.h> #include <sys/scsi/scsi.h> @@ -49,14 +50,12 @@ extern "C" { typedef struct scsi_log_header { #if defined(_BIT_FIELDS_LTOH) uint8_t lh_code : 6, - lh_spf : 1, - lh_ds : 1; + __reserved : 2; #else - uint8_t lh_ds : 1, - lh_spf : 1, + uint8_t __reserved : 2, lh_code : 6; #endif - uint8_t lh_subpage; + uint8_t __reserved2; uint16_t lh_length; } scsi_log_header_t; @@ -159,20 +158,6 @@ typedef struct scsi_selftest_log_param { sizeof (scsi_log_parameter_header_t)) /* - * Described in SBC3 - */ -typedef struct scsi_ssm_log_param { - scsi_log_parameter_header_t ssm_hdr; - uint16_t __reserved2; - uint8_t __reserved1; - uchar_t ssm_prcnt_used; -} scsi_ssm_log_param_t; - -#define LOGPARAM_PRCNT_USED 0x0001 -#define LOGPARAM_PRCNT_USED_PARAM_LEN 0x04 -#define PRCNT_USED_FAULT_THRSH 90 - -/* * Mode sense/select page header information */ typedef struct scsi_ms_header { @@ -293,8 +278,6 @@ typedef struct scsi_ie_page { #define LOGPAGE_TEMP 0x0d #define LOGPAGE_SELFTEST 0x10 #define LOGPAGE_IE 0x2f -/* Solid State Media log page code */ -#define LOGPAGE_SSM 0x11 /* ASC constants */ #define ASC_INVALID_OPCODE 0x20 @@ -324,7 +307,6 @@ typedef struct scsi_ie_page { #define LOGPAGE_SUPP_IE 0x1 #define LOGPAGE_SUPP_TEMP 0x2 #define LOGPAGE_SUPP_SELFTEST 0x4 -#define LOGPAGE_SUPP_SSM 0x8 #define MSG_BUFLEN 256 diff --git a/usr/src/lib/fm/libdiskstatus/common/libdiskstatus.c b/usr/src/lib/fm/libdiskstatus/common/libdiskstatus.c index 18468289a7..e2cf5ad7a2 100644 --- a/usr/src/lib/fm/libdiskstatus/common/libdiskstatus.c +++ b/usr/src/lib/fm/libdiskstatus/common/libdiskstatus.c @@ -21,9 +21,10 @@ /* * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. - * Copyright 2016 Nexenta Systems, Inc. All rights reserved. */ +#pragma ident "%Z%%M% %I% %E% SMI" + /* * Disk status library * @@ -32,10 +33,9 @@ * SCSI (and therefore SATA) disks are currently supported. The library is * capable of detecting the following status conditions: * - * - Predictive failure - * - Overtemp - * - Self-test failure - * - Solid State Media wearout + * - Predictive failure + * - Overtemp + * - Self-test failure */ #include <assert.h> @@ -131,7 +131,6 @@ disk_status_close(disk_status_t *dsp) nvlist_free(dsp->ds_predfail); nvlist_free(dsp->ds_overtemp); nvlist_free(dsp->ds_testfail); - nvlist_free(dsp->ds_ssmwearout); if (dsp->ds_data) dsp->ds_transport->dt_close(dsp->ds_data); (void) close(dsp->ds_fd); @@ -173,8 +172,6 @@ disk_status_get(disk_status_t *dsp) nvlist_free(dsp->ds_testfail); nvlist_free(dsp->ds_predfail); nvlist_free(dsp->ds_overtemp); - nvlist_free(dsp->ds_ssmwearout); - dsp->ds_ssmwearout = NULL; dsp->ds_testfail = dsp->ds_overtemp = dsp->ds_predfail = NULL; dsp->ds_faults = 0; @@ -226,15 +223,6 @@ disk_status_get(disk_status_t *dsp) goto nverror; } - if (dsp->ds_ssmwearout != NULL) { - if ((err = nvlist_add_boolean_value(faults, - FM_EREPORT_SCSI_SSMWEAROUT, - (dsp->ds_faults & DS_FAULT_SSMWEAROUT) != 0)) != 0 || - (err = nvlist_add_nvlist(nvl, FM_EREPORT_SCSI_SSMWEAROUT, - dsp->ds_ssmwearout)) != 0) - goto nverror; - } - if ((err = nvlist_add_nvlist(nvl, "faults", faults)) != 0) goto nverror; diff --git a/usr/src/uts/common/sys/fm/io/disk.h b/usr/src/uts/common/sys/fm/io/disk.h index 99a933217a..6e56bb93e0 100644 --- a/usr/src/uts/common/sys/fm/io/disk.h +++ b/usr/src/uts/common/sys/fm/io/disk.h @@ -21,12 +21,13 @@ /* * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. - * Copyright 2016 Nexenta Systems, Inc. All rights reserved. */ #ifndef _SYS_FM_IO_DISK_H #define _SYS_FM_IO_DISK_H +#pragma ident "%Z%%M% %I% %E% SMI" + #ifdef __cplusplus extern "C" { #endif @@ -36,7 +37,6 @@ extern "C" { #define FM_FAULT_DISK_PREDFAIL "predictive-failure" #define FM_FAULT_DISK_OVERTEMP "over-temperature" #define FM_FAULT_DISK_TESTFAIL "self-test-failure" -#define FM_FAULT_SSM_WEAROUT "ssm-wearout" #ifdef __cplusplus } diff --git a/usr/src/uts/common/sys/fm/io/scsi.h b/usr/src/uts/common/sys/fm/io/scsi.h index f2052e738d..b2b6db5fb1 100644 --- a/usr/src/uts/common/sys/fm/io/scsi.h +++ b/usr/src/uts/common/sys/fm/io/scsi.h @@ -21,12 +21,13 @@ /* * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. - * Copyright 2016 Nexenta Systems, Inc. All rights reserved. */ #ifndef _SYS_FM_IO_SCSI_H #define _SYS_FM_IO_SCSI_H +#pragma ident "%Z%%M% %I% %E% SMI" + #ifdef __cplusplus extern "C" { #endif @@ -47,10 +48,6 @@ extern "C" { #define FM_EREPORT_PAYLOAD_SCSI_CURTEMP "current-temperature" #define FM_EREPORT_PAYLOAD_SCSI_THRESHTEMP "threshold-temperature" -#define FM_EREPORT_SCSI_SSMWEAROUT "ssm-wearout" -#define FM_EREPORT_PAYLOAD_SCSI_CURSSMWEAROUT "current-ssm-wearout" -#define FM_EREPORT_PAYLOAD_SCSI_THRSHSSMWEAROUT "threshold-ssm-wearout" - #define FM_EREPORT_SCSI_TESTFAIL "self-test-failure" #define FM_EREPORT_PAYLOAD_SCSI_RESULTCODE "result-code" #define FM_EREPORT_PAYLOAD_SCSI_ADDRESS "address" |
