Print this page
NEX-6018 Return of the walking dead idm_refcnt_wait_ref comstar threads
Reviewed by:  Rick McNeal <rick.mcneal@nexenta.com>
Reviewed by:  Evan Layton <evan.layton@nexenta.com>
re #12375 rb4141 Create ALUA Support on NexentaStor; Failover causes loss of storage
re #7936 rb3706 Support for COMSTAR/OEM
re #8002 rb3706 Allow setting iSCSI vendor ID via stmf_sbd.conf
re #11454 rb3750 Fix inconsistent vid/pid in stmf
Re #6790 backspace should perform delete on console
VAAI (XXX ATS support for COMSTAR, YYY Block-copy support for COMSTAR)

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/sys/stmf.h
          +++ new/usr/src/uts/common/sys/stmf.h
↓ open down ↓ 10 lines elided ↑ open up ↑
  11   11   * and limitations under the License.
  12   12   *
  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   23   * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
       24 + * Copyright 2016 Nexenta Systems, Inc. All rights reserved.
  23   25   * Copyright (c) 2013 by Delphix. All rights reserved.
  24   26   */
       27 +
  25   28  #ifndef _STMF_H
  26   29  #define _STMF_H
  27   30  
  28   31  #include <sys/stmf_defines.h>
  29   32  
  30   33  #ifdef  __cplusplus
  31   34  extern "C" {
  32   35  #endif
  33   36  
  34   37  typedef enum stmf_struct_id {
↓ open down ↓ 163 lines elided ↑ open up ↑
 198  201   */
 199  202  #define TASK_AF_ENABLE_COMP_CONF        0x01
 200  203  #define TASK_AF_PORT_LOAD_HIGH          0x02
 201  204  #define TASK_AF_NO_EXPECTED_XFER_LENGTH 0x04
 202  205  /*
 203  206   * PP sets this flag if it can process dbufs created by the LU.
 204  207   */
 205  208  #define TASK_AF_ACCEPT_LU_DBUF          0x08
 206  209  
 207  210  /*
      211 + * Indicating a PPPT task
      212 + */
      213 +#define TASK_AF_PPPT_TASK               0x10
      214 +
      215 +/*
 208  216   * scsi_task_t extension identifiers
 209  217   */
 210  218  #define STMF_TASK_EXT_NONE              0
 211  219  
 212  220  /*
 213  221   * max_nbufs
 214  222   */
 215  223  #define STMF_BUFS_MAX           255
 216  224  
 217  225  /*
↓ open down ↓ 154 lines elided ↑ open up ↑
 372  380  void stmf_teardown_dbuf(scsi_task_t *task, stmf_data_buf_t *dbuf);
 373  381  stmf_status_t stmf_xfer_data(scsi_task_t *task, stmf_data_buf_t *dbuf,
 374  382      uint32_t ioflags);
 375  383  stmf_status_t stmf_send_scsi_status(scsi_task_t *task, uint32_t ioflags);
 376  384  void stmf_data_xfer_done(scsi_task_t *task, stmf_data_buf_t *dbuf,
 377  385      uint32_t iof);
 378  386  void stmf_send_status_done(scsi_task_t *task, stmf_status_t s, uint32_t iof);
 379  387  void stmf_task_lu_done(scsi_task_t *task);
 380  388  void stmf_abort(int abort_cmd, scsi_task_t *task, stmf_status_t s, void *arg);
 381  389  void stmf_task_lu_aborted(scsi_task_t *task, stmf_status_t s, uint32_t iof);
 382      -void stmf_task_lport_aborted(scsi_task_t *task, stmf_status_t s, uint32_t iof);
      390 +void stmf_task_lport_aborted_unlocked(scsi_task_t *task, stmf_status_t s,
      391 +    uint32_t iof);
 383  392  stmf_status_t stmf_task_poll_lu(scsi_task_t *task, uint32_t timeout);
 384  393  stmf_status_t stmf_task_poll_lport(scsi_task_t *task, uint32_t timeout);
 385  394  stmf_status_t stmf_ctl(int cmd, void *obj, void *arg);
 386  395  stmf_status_t stmf_register_itl_handle(struct stmf_lu *lu, uint8_t *lun,
 387  396      struct stmf_scsi_session *ss, uint64_t session_id, void *itl_handle);
 388  397  stmf_status_t stmf_deregister_all_lu_itl_handles(struct stmf_lu *lu);
 389  398  stmf_status_t stmf_get_itl_handle(struct stmf_lu *lu, uint8_t *lun,
 390  399      struct stmf_scsi_session *ss, uint64_t session_id, void **itl_handle_retp);
 391  400  stmf_data_buf_t *stmf_handle_to_buf(scsi_task_t *task, uint8_t h);
 392  401  stmf_status_t stmf_lu_add_event(struct stmf_lu *lu, int eventid);
↓ open down ↓ 16 lines elided ↑ open up ↑
 409  418  void stmf_scsilib_handle_task_mgmt(scsi_task_t *task);
 410  419  
 411  420  struct stmf_remote_port *stmf_scsilib_devid_to_remote_port(
 412  421      struct scsi_devid_desc *);
 413  422  boolean_t stmf_scsilib_tptid_validate(struct scsi_transport_id *,
 414  423      uint32_t, uint16_t *);
 415  424  boolean_t stmf_scsilib_tptid_compare(struct scsi_transport_id *,
 416  425      struct scsi_transport_id *);
 417  426  struct stmf_remote_port *stmf_remote_port_alloc(uint16_t);
 418  427  void stmf_remote_port_free(struct stmf_remote_port *);
      428 +struct stmf_lu *stmf_check_and_hold_lu(struct scsi_task *task, uint8_t *guid);
      429 +void stmf_release_lu(struct stmf_lu *lu);
      430 +int stmf_is_task_being_aborted(struct scsi_task *task);
 419  431  #ifdef  __cplusplus
 420  432  }
 421  433  #endif
 422  434  
 423  435  #endif  /* _STMF_H */
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX