Print this page
NEX-3414 CLONE - Port 3339 iscsi/fs:5 causes panic on initiator
NEX-3419 CLONE - Run multi initiator sessions to a single target test can panic the initiator
Reviewed by: Steve Peng <steve.peng@nexenta.com>
4487 snoop can only work with 2GB files
Reviewed by: Jason King <jason.brian.king@gmail.com>
Reviewed by: Marcel Telka <marcel.telka@nexenta.com>
Reviewed by: Sebastien Roy <sebastien.roy@delphix.com>
Approved by: Garrett D'Amore <garrett@damore.org>
3105 Kernel inet_pton() implementation returns result in host byte order
Reviewed by: Garrett D'Amore <garrett@damore.org>
Reviewed by: Robert Mustacchi <rm@joyent.com>

@@ -20,11 +20,11 @@
  */
 
 /*
  * Copyright 2000 by Cisco Systems, Inc.  All rights reserved.
  * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
- * Copyright 2014 Nexenta Systems, Inc.  All rights reserved.
+ * Copyright 2014-2015 Nexenta Systems, Inc.  All rights reserved.
  */
 
 #ifndef _ISCSI_H
 #define _ISCSI_H
 

@@ -547,10 +547,12 @@
 
         uchar_t                 lun_vid[ISCSI_INQ_VID_BUF_LEN]; /* Vendor ID */
         uchar_t                 lun_pid[ISCSI_INQ_PID_BUF_LEN]; /* Product ID */
 
         uchar_t                 lun_type;
+        kmutex_t                lun_mutex;
+        int                     lun_refcnt;
 } iscsi_lun_t;
 
 #define ISCSI_LUN_STATE_CLEAR       0           /* used to clear all states */
 #define ISCSI_LUN_STATE_OFFLINE     1
 #define ISCSI_LUN_STATE_ONLINE      2

@@ -1325,12 +1327,13 @@
                         iscsi_conn_state_t next_state);
 
 /* iscsi_lun.c */
 iscsi_status_t iscsi_lun_create(iscsi_sess_t *isp, uint16_t lun_num,
     uint8_t lun_addr_type, struct scsi_inquiry *inq, char *guid);
-iscsi_status_t iscsi_lun_destroy(iscsi_hba_t *ihp,
-    iscsi_lun_t *ilp);
+void iscsi_lun_hold(iscsi_lun_t *ilp);
+void iscsi_lun_rele(iscsi_lun_t *ilp);
+iscsi_status_t iscsi_lun_destroy(iscsi_hba_t *ihp, iscsi_lun_t *ilp);
 void iscsi_lun_online(iscsi_hba_t *ihp,
     iscsi_lun_t *ilp);
 iscsi_status_t iscsi_lun_offline(iscsi_hba_t *ihp,
     iscsi_lun_t *ilp, boolean_t lun_free);