Print this page
8074 need to add FMA event for SSD wearout

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/fm/modules/common/disk-monitor/disk_monitor.c
          +++ new/usr/src/cmd/fm/modules/common/disk-monitor/disk_monitor.c
↓ open down ↓ 14 lines elided ↑ open up ↑
  15   15   * If applicable, add the following below this CDDL HEADER, with the
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  
  22   22  /*
  23   23   * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  24   24   * Use is subject to license terms.
       25 + * Copyright 2016 Nexenta Systems, Inc.  All rights reserved.
  25   26   */
  26   27  
  27   28  /*
  28   29   * Disk Monitor
  29   30   */
  30   31  #include <sys/types.h>
  31   32  #include <sys/stat.h>
  32   33  #include <fcntl.h>
  33   34  #include <time.h>
  34   35  #include <stdio.h>
↓ open down ↓ 116 lines elided ↑ open up ↑
 151  152           * indicator.
 152  153           */
 153  154          if (fmd_nvl_class_match(hdl, nvl,
 154  155              DISK_ERROR_CLASS "." FM_FAULT_DISK_OVERTEMP))
 155  156                  action_prop = DISK_PROP_OTEMPACTION;
 156  157  
 157  158          if (fmd_nvl_class_match(hdl, nvl,
 158  159              DISK_ERROR_CLASS "." FM_FAULT_DISK_TESTFAIL))
 159  160                  action_prop = DISK_PROP_STFAILACTION;
 160  161  
      162 +        if (fmd_nvl_class_match(hdl, nvl,
      163 +            DISK_ERROR_CLASS "." FM_FAULT_SSM_WEAROUT))
      164 +                action_prop = DISK_PROP_SSMWEAROUTACTION;
      165 +
 161  166          dm_fault_indicator_set(diskp, INDICATOR_ON);
 162  167  
 163  168          if (action_prop != NULL &&
 164  169              (action_string = dm_prop_lookup(diskp->props, action_prop))
 165  170              != NULL) {
 166  171  
 167  172                  if (dm_platform_indicator_execute(action_string) != 0) {
 168  173                          log_warn("Fault action `%s' did not successfully "
 169  174                              "complete.\n", action_string);
 170  175                  }
↓ open down ↓ 227 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX