Print this page
NEX-5428 Backout the 5.0 changes
NEX-2937 Continuous write_same starves all other commands
Reviewed by: Rick McNeal <rick.mcneal@nexenta.com>
Reviewed by: Steve Peng <steve.peng@nexenta.com>
NEX-3217 Panic running benchmark at ESX VM
NEX-3204 Panic doing FC rescan from ESXi 5.5u1 with VAAI enabled
        Reviewed by: Rick McNeal <rick.mcneal@nexenta.com>
        Reviewed by: Tony Nguyen <tony.nguyen@nexenta.com>
NEX-3023 Panics and hangs when using write_same and compare_and_write
Review by: Bayard Bell <bayard.bell@nexenta.com>
Review by: Rick McNeal <rick.mcneal@nexenta.com>
Review by: Jean McCormack <jean.mccormack@nexenta.com>
Approved by: Jean McCormack <jean.mccormack@nexenta.com>
Related bug: NEX-2723 Kernel panic in xfer_completion code for write_same (0x93) and compare_and_write (0x89)
SUP-765 When a Windows Clustered Shared Volume is placed on a pool under Nexenta HA Cluster control the clustered shared disk looses its PGR3 reservation to the presented zvol.
Reviewed by: Bayard Bell <bayard.bell@nexenta.com>
Reviewed by: Tony Nguyen <tony.nguyen@nexenta.com>
Reviewed by: Josef Sipek <josef.sipek@nexenta.com>
NEX-988 itask_lu_[read|write]_time was inadvertently removed by the Illumos 3862 fix


   4  * The contents of this file are subject to the terms of the
   5  * Common Development and Distribution License (the "License").
   6  * You may not use this file except in compliance with the License.
   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 /*
  22  * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
  23  * Copyright (c) 2013 by Delphix. All rights reserved.

  24  */
  25 #ifndef _LPIF_H
  26 #define _LPIF_H
  27 
  28 /*
  29  * Definitions for stmf LUs and lu providers.
  30  */
  31 
  32 #include <sys/stmf_defines.h>
  33 #include <sys/stmf.h>
  34 
  35 #ifdef  __cplusplus
  36 extern "C" {
  37 #endif
  38 
  39 #define LPIF_REV_1      0x00010000
  40 #define LPIF_REV_2      0x00020000
  41 
  42 typedef struct stmf_lu {
  43         void                    *lu_stmf_private;


  59          * is called after the transport has confirmed that status has been
  60          * sent. If completion confirmation is requested then the HBA will
  61          * request a completion confirmation from the host and upon receiving
  62          * the same, this entry point will be called.
  63          */
  64         void                    (*lu_send_status_done)(struct scsi_task *task);
  65         void                    (*lu_task_free)(struct scsi_task *task);
  66         stmf_status_t           (*lu_abort)(struct stmf_lu *lu,
  67                 int abort_cmd, void *arg, uint32_t flags);
  68         void                    (*lu_task_poll)(struct scsi_task *task);
  69         void                    (*lu_ctl)(struct stmf_lu *lu, int cmd,
  70                                                                 void *arg);
  71         stmf_status_t           (*lu_info)(uint32_t cmd, struct stmf_lu *lu,
  72                 void *arg, uint8_t *buf, uint32_t *bufsizep);
  73         void                    (*lu_event_handler)(struct stmf_lu *lu,
  74                 int eventid, void *arg, uint32_t flags);
  75         void                    *lu_proxy_reg_arg;
  76         uint32_t                lu_proxy_reg_arg_len;
  77         void                    (*lu_dbuf_free)(struct scsi_task *task,
  78                 struct stmf_data_buf *dbuf);

  79 } stmf_lu_t;
  80 
  81 /*
  82  * Abort cmd
  83  */
  84 #define STMF_LU_ABORT_TASK              1
  85 #define STMF_LU_RESET_STATE             2
  86 #define STMF_LU_ITL_HANDLE_REMOVED      3

  87 
  88 /*
  89  * Asymmetric access state
  90  */
  91 #define STMF_LU_ACTIVE                  0
  92 #define STMF_LU_STANDBY                 1
  93 
  94 /*
  95  * proxy register msg types
  96  */
  97 #define STMF_MSG_LU_REGISTER            0
  98 #define STMF_MSG_LU_ACTIVE              1
  99 #define STMF_MSG_LU_DEREGISTER          2
 100 
 101 
 102 #define STMF_PROXY_READ                 1
 103 #define STMF_PROXY_WRITE                2
 104 
 105 /*
 106  * Reasons for itl handle removal. Passed in flags.


 115         void                    *lp_stmf_private;
 116         void                    *lp_private;
 117 
 118         uint32_t                lp_lpif_rev;    /* Currently LPIF_REV_2 */
 119         int                     lp_instance;
 120         char                    *lp_name;
 121         void                    (*lp_cb)(struct stmf_lu_provider *lp,
 122             int cmd, void *arg, uint32_t flags);
 123         uint8_t                 lp_alua_support;
 124         stmf_status_t           (*lp_proxy_msg)(uint8_t *luid,
 125             void *proxy_reg_arg, uint32_t proxy_reg_arg_len, uint32_t type);
 126 } stmf_lu_provider_t;
 127 
 128 stmf_status_t stmf_deregister_lu_provider(stmf_lu_provider_t *lp);
 129 stmf_status_t stmf_register_lu_provider(stmf_lu_provider_t *lp);
 130 stmf_status_t stmf_register_lu(stmf_lu_t *lup);
 131 stmf_status_t stmf_deregister_lu(stmf_lu_t *lup);
 132 stmf_status_t stmf_set_lu_access(stmf_lu_t *lup, uint8_t access_state);
 133 stmf_status_t stmf_proxy_scsi_cmd(scsi_task_t *, stmf_data_buf_t *dbuf);
 134 int stmf_is_standby_port(scsi_task_t *);



 135 
 136 #ifdef  __cplusplus
 137 }
 138 #endif
 139 
 140 #endif /* _LPIF_H */


   4  * The contents of this file are subject to the terms of the
   5  * Common Development and Distribution License (the "License").
   6  * You may not use this file except in compliance with the License.
   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 /*
  22  * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
  23  * Copyright (c) 2013 by Delphix. All rights reserved.
  24  * Copyright 2015 Nexenta Systems, Inc.  All rights reserved.
  25  */
  26 #ifndef _LPIF_H
  27 #define _LPIF_H
  28 
  29 /*
  30  * Definitions for stmf LUs and lu providers.
  31  */
  32 
  33 #include <sys/stmf_defines.h>
  34 #include <sys/stmf.h>
  35 
  36 #ifdef  __cplusplus
  37 extern "C" {
  38 #endif
  39 
  40 #define LPIF_REV_1      0x00010000
  41 #define LPIF_REV_2      0x00020000
  42 
  43 typedef struct stmf_lu {
  44         void                    *lu_stmf_private;


  60          * is called after the transport has confirmed that status has been
  61          * sent. If completion confirmation is requested then the HBA will
  62          * request a completion confirmation from the host and upon receiving
  63          * the same, this entry point will be called.
  64          */
  65         void                    (*lu_send_status_done)(struct scsi_task *task);
  66         void                    (*lu_task_free)(struct scsi_task *task);
  67         stmf_status_t           (*lu_abort)(struct stmf_lu *lu,
  68                 int abort_cmd, void *arg, uint32_t flags);
  69         void                    (*lu_task_poll)(struct scsi_task *task);
  70         void                    (*lu_ctl)(struct stmf_lu *lu, int cmd,
  71                                                                 void *arg);
  72         stmf_status_t           (*lu_info)(uint32_t cmd, struct stmf_lu *lu,
  73                 void *arg, uint8_t *buf, uint32_t *bufsizep);
  74         void                    (*lu_event_handler)(struct stmf_lu *lu,
  75                 int eventid, void *arg, uint32_t flags);
  76         void                    *lu_proxy_reg_arg;
  77         uint32_t                lu_proxy_reg_arg_len;
  78         void                    (*lu_dbuf_free)(struct scsi_task *task,
  79                 struct stmf_data_buf *dbuf);
  80         void                    (*lu_task_done)(struct scsi_task *task);
  81 } stmf_lu_t;
  82 
  83 /*
  84  * Abort cmd
  85  */
  86 #define STMF_LU_ABORT_TASK              1
  87 #define STMF_LU_RESET_STATE             2
  88 #define STMF_LU_ITL_HANDLE_REMOVED      3
  89 #define STMF_LU_SET_ABORT               4
  90 
  91 /*
  92  * Asymmetric access state
  93  */
  94 #define STMF_LU_ACTIVE                  0
  95 #define STMF_LU_STANDBY                 1
  96 
  97 /*
  98  * proxy register msg types
  99  */
 100 #define STMF_MSG_LU_REGISTER            0
 101 #define STMF_MSG_LU_ACTIVE              1
 102 #define STMF_MSG_LU_DEREGISTER          2
 103 
 104 
 105 #define STMF_PROXY_READ                 1
 106 #define STMF_PROXY_WRITE                2
 107 
 108 /*
 109  * Reasons for itl handle removal. Passed in flags.


 118         void                    *lp_stmf_private;
 119         void                    *lp_private;
 120 
 121         uint32_t                lp_lpif_rev;    /* Currently LPIF_REV_2 */
 122         int                     lp_instance;
 123         char                    *lp_name;
 124         void                    (*lp_cb)(struct stmf_lu_provider *lp,
 125             int cmd, void *arg, uint32_t flags);
 126         uint8_t                 lp_alua_support;
 127         stmf_status_t           (*lp_proxy_msg)(uint8_t *luid,
 128             void *proxy_reg_arg, uint32_t proxy_reg_arg_len, uint32_t type);
 129 } stmf_lu_provider_t;
 130 
 131 stmf_status_t stmf_deregister_lu_provider(stmf_lu_provider_t *lp);
 132 stmf_status_t stmf_register_lu_provider(stmf_lu_provider_t *lp);
 133 stmf_status_t stmf_register_lu(stmf_lu_t *lup);
 134 stmf_status_t stmf_deregister_lu(stmf_lu_t *lup);
 135 stmf_status_t stmf_set_lu_access(stmf_lu_t *lup, uint8_t access_state);
 136 stmf_status_t stmf_proxy_scsi_cmd(scsi_task_t *, stmf_data_buf_t *dbuf);
 137 int stmf_is_standby_port(scsi_task_t *);
 138 void stmf_lu_xfer_done(struct scsi_task *task, boolean_t read,
 139     hrtime_t elapsed_time);
 140 boolean_t stmf_is_pgr_aptpl_always();
 141 
 142 #ifdef  __cplusplus
 143 }
 144 #endif
 145 
 146 #endif /* _LPIF_H */