Print this page
3862 stmf + kstat = kernel panic
3863 stmf_itl_task_start() must check for ilu->ilu_kstat_io is non-null
3864 memory leak in the iSCSI code
Reviewed by: Adam Leventhal <ahl@delphix.com>
Reviewed by: Jeremy Jones <jeremy@delphix.com>
Reviewed by: Sebastien Roy <sebastien.roy@delphix.com>
Reviewed by: Dan McDonald <danmcd@nexenta.com>
Reviewed by: Garrett D'Amore <garrett@damore.org>
Reviewed by: Richard Elling <richard.elling@gmail.com>
Approved by: Gordon Ross <gwr@nexenta.com>
3621 ZFS LU stuck in the offlining state
Reviewed by: Sebastien Roy <sebastien.roy@delphix.com>
Reviewed by: Jeff Biseda <jeff.biseda@delphix.com>
Reviewed by: Dan McDonald <danmcd@nexenta.com>
Approved by: Christopher Siden <christopher.siden@delphix.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/io/comstar/stmf/stmf_impl.h
          +++ new/usr/src/uts/common/io/comstar/stmf/stmf_impl.h
↓ open down ↓ 12 lines elided ↑ open up ↑
  13   13   * When distributing Covered Code, include this CDDL HEADER in each
  14   14   * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  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   * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
       23 + * Copyright (c) 2013 by Delphix. All rights reserved.
  23   24   */
  24   25  #ifndef _STMF_IMPL_H
  25   26  #define _STMF_IMPL_H
  26   27  
  27   28  #include <sys/stmf_defines.h>
  28   29  #include <sys/stmf_ioctl.h>
  29   30  
  30   31  #ifdef  __cplusplus
  31   32  extern "C" {
  32   33  #endif
↓ open down ↓ 57 lines elided ↑ open up ↑
  90   91          uint32_t        ilu_ntasks_min_free; /* # minimal free tasks */
  91   92          uint32_t        rsvd1;
  92   93          uint32_t        ilu_proxy_registered;
  93   94          uint64_t        ilu_reg_msgid;
  94   95          struct stmf_i_scsi_task *ilu_tasks;
  95   96          struct stmf_i_scsi_task *ilu_free_tasks;
  96   97          struct stmf_itl_data    *ilu_itl_list;
  97   98          kstat_t         *ilu_kstat_info;
  98   99          kstat_t         *ilu_kstat_io;
  99  100          kmutex_t        ilu_kstat_lock;
      101 +        kcondvar_t      ilu_offline_pending_cv;
 100  102  
 101  103          /* point to the luid entry in stmf_state.stmf_luid_list */
 102  104          void            *ilu_luid;
 103  105  } stmf_i_lu_t;
 104  106  
 105  107  /*
 106  108   * ilu_flags
 107  109   */
 108  110  #define ILU_STALL_DEREGISTER            0x0001
 109  111  #define ILU_RESET_ACTIVE                0x0002
↓ open down ↓ 47 lines elided ↑ open up ↑
 157  159  #define MAX_IRPORT                      0x10000
 158  160  
 159  161  typedef struct stmf_i_remote_port {
 160  162          struct scsi_devid_desc  *irport_id;
 161  163          kmutex_t                irport_mutex;
 162  164          int                     irport_refcnt;
 163  165          id_t                    irport_instance;
 164  166          avl_node_t              irport_ln;
 165  167  } stmf_i_remote_port_t;
 166  168  
 167      -typedef struct stmf_i_itl_kstat {
 168      -        char                    iitl_kstat_nm[KSTAT_STRLEN];
 169      -        char                    iitl_kstat_lport[STMF_TGT_NAME_LEN];
 170      -        char                    iitl_kstat_guid[STMF_GUID_INPUT + 1];
 171      -        char                    *iitl_kstat_strbuf;
 172      -        int                     iitl_kstat_strbuflen;
 173      -        kstat_t                 *iitl_kstat_info;
 174      -        kstat_t                 *iitl_kstat_taskq;
 175      -        kstat_t                 *iitl_kstat_lu_xfer;
 176      -        kstat_t                 *iitl_kstat_lport_xfer;
 177      -        avl_node_t              iitl_kstat_ln;
 178      -} stmf_i_itl_kstat_t;
 179      -
 180  169  /*
 181  170   * ilport flags
 182  171   */
 183  172  #define ILPORT_FORCED_OFFLINE           0x01
 184  173  #define ILPORT_SS_GOT_INITIAL_LUNS      0x02
 185  174  
 186  175  typedef struct stmf_i_scsi_session {
 187  176          stmf_scsi_session_t     *iss_ss;
 188  177          uint32_t                iss_alloc_size;
 189  178          uint32_t                iss_flags;
↓ open down ↓ 128 lines elided ↑ open up ↑
 318  307  #define ITASK_CMD_POLL_LPORT            (ITASK_CMD_POLL | 2)
 319  308  
 320  309  /*
 321  310   * struct maintained on a per itl basis when the lu registers ITL handle.
 322  311   */
 323  312  typedef struct stmf_itl_data {
 324  313          uint32_t                        itl_counter;
 325  314          uint8_t                         itl_flags;
 326  315          uint8_t                         itl_hdlrm_reason;
 327  316          uint16_t                        itl_lun;
 328      -        char                            *itl_kstat_strbuf;
 329      -        int                             itl_kstat_strbuflen;
 330      -        kstat_t                         *itl_kstat_info;
 331      -        kstat_t                         *itl_kstat_taskq;
 332      -        kstat_t                         *itl_kstat_lu_xfer;
 333      -        kstat_t                         *itl_kstat_lport_xfer;
 334  317          void                            *itl_handle;
 335  318          struct stmf_i_lu                *itl_ilu;
 336  319          struct stmf_i_scsi_session      *itl_session;
 337  320          struct stmf_itl_data            *itl_next;
 338  321  } stmf_itl_data_t;
 339  322  
 340  323  /*
 341  324   * itl flags
 342  325   */
 343  326  #define STMF_ITL_BEING_TERMINATED       0x01
↓ open down ↓ 73 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX