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)
        
@@ -16,14 +16,17 @@
  * fields enclosed by brackets "[]" replaced with your own identifying
  * information: Portions Copyright [yyyy] [name of copyright owner]
  *
  * CDDL HEADER END
  */
+
 /*
  * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright 2016 Nexenta Systems, Inc. All rights reserved.
  * Copyright (c) 2013 by Delphix. All rights reserved.
  */
+
 #ifndef _STMF_H
 #define _STMF_H
 
 #include <sys/stmf_defines.h>
 
@@ -203,10 +206,15 @@
  * PP sets this flag if it can process dbufs created by the LU.
  */
 #define TASK_AF_ACCEPT_LU_DBUF          0x08
 
 /*
+ * Indicating a PPPT task
+ */
+#define TASK_AF_PPPT_TASK               0x10
+
+/*
  * scsi_task_t extension identifiers
  */
 #define STMF_TASK_EXT_NONE              0
 
 /*
@@ -377,11 +385,12 @@
     uint32_t iof);
 void stmf_send_status_done(scsi_task_t *task, stmf_status_t s, uint32_t iof);
 void stmf_task_lu_done(scsi_task_t *task);
 void stmf_abort(int abort_cmd, scsi_task_t *task, stmf_status_t s, void *arg);
 void stmf_task_lu_aborted(scsi_task_t *task, stmf_status_t s, uint32_t iof);
-void stmf_task_lport_aborted(scsi_task_t *task, stmf_status_t s, uint32_t iof);
+void stmf_task_lport_aborted_unlocked(scsi_task_t *task, stmf_status_t s,
+    uint32_t iof);
 stmf_status_t stmf_task_poll_lu(scsi_task_t *task, uint32_t timeout);
 stmf_status_t stmf_task_poll_lport(scsi_task_t *task, uint32_t timeout);
 stmf_status_t stmf_ctl(int cmd, void *obj, void *arg);
 stmf_status_t stmf_register_itl_handle(struct stmf_lu *lu, uint8_t *lun,
     struct stmf_scsi_session *ss, uint64_t session_id, void *itl_handle);
@@ -414,10 +423,13 @@
     uint32_t, uint16_t *);
 boolean_t stmf_scsilib_tptid_compare(struct scsi_transport_id *,
     struct scsi_transport_id *);
 struct stmf_remote_port *stmf_remote_port_alloc(uint16_t);
 void stmf_remote_port_free(struct stmf_remote_port *);
+struct stmf_lu *stmf_check_and_hold_lu(struct scsi_task *task, uint8_t *guid);
+void stmf_release_lu(struct stmf_lu *lu);
+int stmf_is_task_being_aborted(struct scsi_task *task);
 #ifdef  __cplusplus
 }
 #endif
 
 #endif  /* _STMF_H */