The Lee-Man | 13 May 18:58 2016
Picon
Gravatar

Using all 24-bits of the ISID

When we made the most recent changes to open-iscsi:

  "make use of all 24 bits of ISID qualifier space"

we agreed it would be a "good thing" to modify the kernel
to use the "id" routines instead of an atomic int.

I created a set of patches and submitted them, and they
got comments, but the current version has sat for a month
without comment.

I'd really like to either get these changes into the kernel
if we want them there.

Can anyone on the list review them, please, if they get a chance?

On LKML or linux-scsi, the subject is:

  "Re: [PATCHv3 0/2] target: make location of /var/targets configurable"

Thank you.
--
Lee Duncan

--
You received this message because you are subscribed to the Google Groups "open-iscsi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to open-iscsi+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To post to this group, send email to open-iscsi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
Visit this group at https://groups.google.com/group/open-iscsi.
For more options, visit https://groups.google.com/d/optout.
Zhengyuan Liu | 12 May 05:29 2016
Picon

open-iscsi Ping timeout error.

Hi everyone:
I create a target using fileio as the backend storage on ARM64 server. The initiator reported some errors showed bellow  while perform iozone test.

[178444.145679]  connection14:0: ping timeout of 5 secs expired, recv timeout 5, last rx 4339462894, last ping 4339464146, now 4339465400
[178444.145706]  connection14:0: detected conn error (1011)
[178469.674313]  connection14:0: detected conn error (1020)
[178504.420979]  connection14:0: ping timeout of 5 secs expired, recv timeout 5, last rx 4339477953, last ping 4339479204, now 4339480456
[178504.421001]  connection14:0: detected conn error (1011)
[178532.064262]  connection14:0: detected conn error (1020)
[178564.584087]  connection14:0: ping timeout of 5 secs expired, recv timeout 5, last rx 4339492980, last ping 4339494232, now 4339495484
..............................

I try to trace the function call of target iscsi. Then, I found the  receiving  thread of target iscsi blocked at fd_execute_sync_cache -> vfs_fsync_range. Further, vfs_fsync_range may takes more than 10 seconds to return,while initiator Ping timeout would happened after 5 seconds.   vfs_fsync_range was call with the form vfs_fsync_range(fd_dev->fd_file, 0, LLONG_MAX, 1) every times  which means sync all device cache. 
So, is this a bug?
How  does Initiator send sync_cache scsi command? 
Does it need to sync all device cache at once?
Any reply would be thankful.

--
You received this message because you are subscribed to the Google Groups "open-iscsi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to open-iscsi+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To post to this group, send email to open-iscsi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
Visit this group at https://groups.google.com/group/open-iscsi.
For more options, visit https://groups.google.com/d/optout.
whls.jing | 9 May 17:32 2016
Picon

Question: Where are scsi commands encapsulated?

Hi,

I am recently looking into the process of iSCSI initiator. I wonder where the source codes are that receive the scsi commands and encapsulate them into iscsi format. I have walked through the interaction between iscsiadm and iscsid, but I did find that. I thought it may be written in qtask structure, but it seems the payload_len is never set within the code.

Could anyone help answer this question?

Thanks.

--
You received this message because you are subscribed to the Google Groups "open-iscsi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to open-iscsi+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To post to this group, send email to open-iscsi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
Visit this group at https://groups.google.com/group/open-iscsi.
For more options, visit https://groups.google.com/d/optout.
Mike Christie | 22 Apr 20:28 2016
Picon

[ANNOUNCE] new open-iscsi maintainers

Hi open-iscsi list,

I am very happy to announce that Chris Leech and Lee Duncan will be
taking over open-iscsi maintainership.

They have created a new github organization:

https://github.com/open-iscsi

that will host the userspace code.

Send all userspace patches to the list and to Chris Leech
(cleech@...) and Lee Duncan (lduncan@...).

Send kernel patches to this list, myself, and also to Lee and Chris. In
the hopefully near future, they will be comfortable with taking over the
kernel code as well.

Thanks to Lee and Chris for taking this over!

--

-- 
You received this message because you are subscribed to the Google Groups "open-iscsi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to open-iscsi+unsubscribe@...
To post to this group, send email to open-iscsi@...
Visit this group at https://groups.google.com/group/open-iscsi.
For more options, visit https://groups.google.com/d/optout.

Bob Stlt | 17 Apr 17:05 2016

[PATCH] SCSI: LIBSCSI: Fixed codeing style errors

Fixed codeing style formatting errors.

Signed-off-by: Bob Stlt <bobstlt40@...>
---
 drivers/scsi/libiscsi.c | 90 ++++++++++++++++++++++++-------------------------
 1 file changed, 45 insertions(+), 45 deletions(-)

diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c
index 6bffd91..41be9d3 100644
--- a/drivers/scsi/libiscsi.c
+++ b/drivers/scsi/libiscsi.c
 <at>  <at>  -197,7 +197,7  <at>  <at>  static int iscsi_prep_ecdb_ahs(struct iscsi_task *task)
 	pad_len = iscsi_padding(rlen);

 	rc = iscsi_add_hdr(task, sizeof(ecdb_ahdr->ahslength) +
-	                   sizeof(ecdb_ahdr->ahstype) + ahslength + pad_len);
+			sizeof(ecdb_ahdr->ahstype) + ahslength + pad_len);
 	if (rc)
 		return rc;

 <at>  <at>  -210,10 +210,10  <at>  <at>  static int iscsi_prep_ecdb_ahs(struct iscsi_task *task)
 	memcpy(ecdb_ahdr->ecdb, cmd->cmnd + ISCSI_CDB_SIZE, rlen);

 	ISCSI_DBG_SESSION(task->conn->session,
-			  "iscsi_prep_ecdb_ahs: varlen_cdb_len %d "
-		          "rlen %d pad_len %d ahs_length %d iscsi_headers_size "
-		          "%u\n", cmd->cmd_len, rlen, pad_len, ahslength,
-		          task->hdr_len);
+			"iscsi_prep_ecdb_ahs: varlen_cdb_len %d "
+			"rlen %d pad_len %d ahs_length %d iscsi_headers_size "
+			"%u\n", cmd->cmd_len, rlen, pad_len, ahslength,
+			task->hdr_len);
 	return 0;
 }

 <at>  <at>  -236,10 +236,10  <at>  <at>  static int iscsi_prep_bidi_ahs(struct iscsi_task *task)
 	rlen_ahdr->read_length = cpu_to_be32(scsi_in(sc)->length);

 	ISCSI_DBG_SESSION(task->conn->session,
-			  "bidi-in rlen_ahdr->read_length(%d) "
-		          "rlen_ahdr->ahslength(%d)\n",
-		          be32_to_cpu(rlen_ahdr->read_length),
-		          be16_to_cpu(rlen_ahdr->ahslength));
+			"bidi-in rlen_ahdr->read_length(%d) "
+			"rlen_ahdr->ahslength(%d)\n",
+			be32_to_cpu(rlen_ahdr->read_length),
+			be16_to_cpu(rlen_ahdr->ahslength));
 	return 0;
 }

 <at>  <at>  -500,7 +500,7  <at>  <at>  static void iscsi_free_task(struct iscsi_task *task)
 	if (conn->login_task == task)
 		return;

-	kfifo_in(&session->cmdpool.queue, (void*)&task, sizeof(void*));
+	kfifo_in(&session->cmdpool.queue, (void *)&task, sizeof(void *));

 	if (sc) {
 		/* SCSI eh reuses commands to verify us */
 <at>  <at>  -736,7 +736,7  <at>  <at>  __iscsi_conn_send_pdu(struct iscsi_conn *conn, struct iscsi_hdr *hdr,
 		BUG_ON(conn->c_stage == ISCSI_CONN_STOPPED);

 		if (!kfifo_out(&session->cmdpool.queue,
-				 (void*)&task, sizeof(void*)))
+				 (void *)&task, sizeof(void *)))
 			return NULL;
 	}
 	/*
 <at>  <at>  -831,7 +831,7  <at>  <at>  static void iscsi_scsi_cmd_rsp(struct iscsi_conn *conn, struct iscsi_hdr *hdr,
 	struct iscsi_session *session = conn->session;
 	struct scsi_cmnd *sc = task->sc;

-	iscsi_update_cmdsn(session, (struct iscsi_nopin*)rhdr);
+	iscsi_update_cmdsn(session, (struct iscsi_nopin *)rhdr);
 	conn->exp_statsn = be32_to_cpu(rhdr->statsn) + 1;

 	sc->result = (DID_OK << 16) | rhdr->cmd_status;
 <at>  <at>  -901,12 +901,12  <at>  <at>  invalid_datalen:
 	}

 	if (rhdr->flags & (ISCSI_FLAG_CMD_UNDERFLOW |
-	                   ISCSI_FLAG_CMD_OVERFLOW)) {
+			ISCSI_FLAG_CMD_OVERFLOW)) {
 		int res_count = be32_to_cpu(rhdr->residual_count);

 		if (res_count > 0 &&
 		    (rhdr->flags & ISCSI_FLAG_CMD_OVERFLOW ||
-		     res_count <= scsi_bufflen(sc)))
+			res_count <= scsi_bufflen(sc)))
 			/* write side for bidi or uni-io set_resid */
 			scsi_set_resid(sc, res_count);
 		else
 <at>  <at>  -939,7 +939,7  <at>  <at>  iscsi_data_in_rsp(struct iscsi_conn *conn, struct iscsi_hdr *hdr,
 	sc->result = (DID_OK << 16) | rhdr->cmd_status;
 	conn->exp_statsn = be32_to_cpu(rhdr->statsn) + 1;
 	if (rhdr->flags & (ISCSI_FLAG_DATA_UNDERFLOW |
-	                   ISCSI_FLAG_DATA_OVERFLOW)) {
+			ISCSI_FLAG_DATA_OVERFLOW)) {
 		int res_count = be32_to_cpu(rhdr->residual_count);

 		if (res_count > 0 &&
 <at>  <at>  -978,7 +978,7  <at>  <at>  static void iscsi_tmf_rsp(struct iscsi_conn *conn, struct iscsi_hdr *hdr)

 static int iscsi_send_nopout(struct iscsi_conn *conn, struct iscsi_nopin *rhdr)
 {
-        struct iscsi_nopout hdr;
+	struct iscsi_nopout hdr;
 	struct iscsi_task *task;

 	if (!rhdr && conn->ping_task)
 <at>  <at>  -1080,7 +1080,7  <at>  <at>  static int iscsi_handle_reject(struct iscsi_conn *conn, struct iscsi_hdr *hdr,
 			spin_unlock(&conn->session->back_lock);
 			spin_lock(&conn->session->frwd_lock);
 			iscsi_send_nopout(conn,
-					  (struct iscsi_nopin*)&rejected_pdu);
+						(struct iscsi_nopin *)&rejected_pdu);
 			spin_unlock(&conn->session->frwd_lock);
 			spin_lock(&conn->session->back_lock);
 		} else {
 <at>  <at>  -1097,7 +1097,7  <at>  <at>  static int iscsi_handle_reject(struct iscsi_conn *conn, struct iscsi_hdr *hdr,
 				rc = ISCSI_ERR_BAD_ITT;
 			} else
 				rc = iscsi_nop_out_rsp(task,
-					(struct iscsi_nopin*)&rejected_pdu,
+					(struct iscsi_nopin *)&rejected_pdu,
 					NULL, 0);
 		}
 		break;
 <at>  <at>  -1173,9 +1173,9  <at>  <at>  int __iscsi_complete_pdu(struct iscsi_conn *conn, struct iscsi_hdr *hdr,
 			  opcode, conn->id, itt, datalen);

 	if (itt == ~0U) {
-		iscsi_update_cmdsn(session, (struct iscsi_nopin*)hdr);
+		iscsi_update_cmdsn(session, (struct iscsi_nopin *)hdr);

-		switch(opcode) {
+		switch (opcode) {
 		case ISCSI_OP_NOOP_IN:
 			if (datalen) {
 				rc = ISCSI_ERR_PROTO;
 <at>  <at>  -1188,7 +1188,7  <at>  <at>  int __iscsi_complete_pdu(struct iscsi_conn *conn, struct iscsi_hdr *hdr,
 			/* In RX path we are under back lock */
 			spin_unlock(&session->back_lock);
 			spin_lock(&session->frwd_lock);
-			iscsi_send_nopout(conn, (struct iscsi_nopin*)hdr);
+			iscsi_send_nopout(conn, (struct iscsi_nopin *)hdr);
 			spin_unlock(&session->frwd_lock);
 			spin_lock(&session->back_lock);
 			break;
 <at>  <at>  -1207,7 +1207,7  <at>  <at>  int __iscsi_complete_pdu(struct iscsi_conn *conn, struct iscsi_hdr *hdr,
 		goto out;
 	}

-	switch(opcode) {
+	switch (opcode) {
 	case ISCSI_OP_SCSI_CMD_RSP:
 	case ISCSI_OP_SCSI_DATA_IN:
 		task = iscsi_itt_to_ctask(conn, hdr->itt);
 <at>  <at>  -1233,7 +1233,7  <at>  <at>  int __iscsi_complete_pdu(struct iscsi_conn *conn, struct iscsi_hdr *hdr,
 		return ISCSI_ERR_BAD_OPCODE;
 	}

-	switch(opcode) {
+	switch (opcode) {
 	case ISCSI_OP_SCSI_CMD_RSP:
 		iscsi_scsi_cmd_rsp(conn, hdr, task, data, datalen);
 		break;
 <at>  <at>  -1241,7 +1241,7  <at>  <at>  int __iscsi_complete_pdu(struct iscsi_conn *conn, struct iscsi_hdr *hdr,
 		iscsi_data_in_rsp(conn, hdr, task);
 		break;
 	case ISCSI_OP_LOGOUT_RSP:
-		iscsi_update_cmdsn(session, (struct iscsi_nopin*)hdr);
+		iscsi_update_cmdsn(session, (struct iscsi_nopin *)hdr);
 		if (datalen) {
 			rc = ISCSI_ERR_PROTO;
 			break;
 <at>  <at>  -1250,14 +1250,14  <at>  <at>  int __iscsi_complete_pdu(struct iscsi_conn *conn, struct iscsi_hdr *hdr,
 		goto recv_pdu;
 	case ISCSI_OP_LOGIN_RSP:
 	case ISCSI_OP_TEXT_RSP:
-		iscsi_update_cmdsn(session, (struct iscsi_nopin*)hdr);
+		iscsi_update_cmdsn(session, (struct iscsi_nopin *)hdr);
 		/*
 		 * login related PDU's exp_statsn is handled in
 		 * userspace
 		 */
 		goto recv_pdu;
 	case ISCSI_OP_SCSI_TMFUNC_RSP:
-		iscsi_update_cmdsn(session, (struct iscsi_nopin*)hdr);
+		iscsi_update_cmdsn(session, (struct iscsi_nopin *)hdr);
 		if (datalen) {
 			rc = ISCSI_ERR_PROTO;
 			break;
 <at>  <at>  -1267,14 +1267,14  <at>  <at>  int __iscsi_complete_pdu(struct iscsi_conn *conn, struct iscsi_hdr *hdr,
 		iscsi_complete_task(task, ISCSI_TASK_COMPLETED);
 		break;
 	case ISCSI_OP_NOOP_IN:
-		iscsi_update_cmdsn(session, (struct iscsi_nopin*)hdr);
+		iscsi_update_cmdsn(session, (struct iscsi_nopin *)hdr);
 		if (hdr->ttt != cpu_to_be32(ISCSI_RESERVED_TAG) || datalen) {
 			rc = ISCSI_ERR_PROTO;
 			break;
 		}
 		conn->exp_statsn = be32_to_cpu(hdr->statsn) + 1;

-		rc = iscsi_nop_out_rsp(task, (struct iscsi_nopin*)hdr,
+		rc = iscsi_nop_out_rsp(task, (struct iscsi_nopin *)hdr,
 				       data, datalen);
 		break;
 	default:
 <at>  <at>  -1383,7 +1383,7  <at>  <at>  void iscsi_session_failure(struct iscsi_session *session,
 	dev = get_device(&conn->cls_conn->dev);
 	spin_unlock_bh(&session->frwd_lock);
 	if (!dev)
-	        return;
+		return;
 	/*
 	 * if the host is being removed bypass the connection
 	 * recovery initialization because we are going to kill
 <at>  <at>  -1503,8 +1503,8  <at>  <at>  static int iscsi_data_xmit(struct iscsi_conn *conn)

 	if (conn->task) {
 		rc = iscsi_xmit_task(conn);
-	        if (rc)
-		        goto done;
+		if (rc)
+			goto done;
 	}

 	/*
 <at>  <at>  -2534,11 +2534,11  <at>  <at>  iscsi_pool_init(struct iscsi_pool *q, int max, void ***items, int item_size)
 	 * the array. */
 	if (items)
 		num_arrays++;
-	q->pool = kzalloc(num_arrays * max * sizeof(void*), GFP_KERNEL);
+	q->pool = kzalloc(num_arrays * max * sizeof(void *), GFP_KERNEL);
 	if (q->pool == NULL)
 		return -ENOMEM;

-	kfifo_init(&q->queue, (void*)q->pool, max * sizeof(void*));
+	kfifo_init(&q->queue, (void *)q->pool, max * sizeof(void *));

 	for (i = 0; i < max; i++) {
 		q->pool[i] = kzalloc(item_size, GFP_KERNEL);
 <at>  <at>  -2546,7 +2546,7  <at>  <at>  iscsi_pool_init(struct iscsi_pool *q, int max, void ***items, int item_size)
 			q->max = i;
 			goto enomem;
 		}
-		kfifo_in(&q->queue, (void*)&q->pool[i], sizeof(void*));
+		kfifo_in(&q->queue, (void *)&q->pool[i], sizeof(void *));
 	}

 	if (items) {
 <at>  <at>  -2793,7 +2793,7  <at>  <at>  iscsi_session_setup(struct iscsi_transport *iscsit, struct Scsi_Host *shost,

 	/* initialize SCSI PDU commands pool */
 	if (iscsi_pool_init(&session->cmdpool, session->cmds_max,
-			    (void***)&session->cmds,
+			    (void ***)&session->cmds,
 			    cmd_task_size + sizeof(struct iscsi_task)))
 		goto cmdpool_alloc_fail;

 <at>  <at>  -2905,8 +2905,8  <at>  <at>  iscsi_conn_setup(struct iscsi_cls_session *cls_session, int dd_size,
 	/* allocate login_task used for the login/text sequences */
 	spin_lock_bh(&session->frwd_lock);
 	if (!kfifo_out(&session->cmdpool.queue,
-                         (void*)&conn->login_task,
-			 sizeof(void*))) {
+			(void *)&conn->login_task,
+			 sizeof(void *))) {
 		spin_unlock_bh(&session->frwd_lock);
 		goto login_task_alloc_fail;
 	}
 <at>  <at>  -2924,8 +2924,8  <at>  <at>  iscsi_conn_setup(struct iscsi_cls_session *cls_session, int dd_size,
 	return cls_conn;

 login_task_data_alloc_fail:
-	kfifo_in(&session->cmdpool.queue, (void*)&conn->login_task,
-		    sizeof(void*));
+	kfifo_in(&session->cmdpool.queue, (void *)&conn->login_task,
+		    sizeof(void *));
 login_task_alloc_fail:
 	iscsi_destroy_conn(cls_conn);
 	return NULL;
 <at>  <at>  -2968,8 +2968,8  <at>  <at>  void iscsi_conn_teardown(struct iscsi_cls_conn *cls_conn)
 	kfree(conn->local_ipaddr);
 	/* regular RX path uses back_lock */
 	spin_lock_bh(&session->back_lock);
-	kfifo_in(&session->cmdpool.queue, (void*)&conn->login_task,
-		    sizeof(void*));
+	kfifo_in(&session->cmdpool.queue, (void *)&conn->login_task,
+			sizeof(void *));
 	spin_unlock_bh(&session->back_lock);
 	if (session->leadconn == conn)
 		session->leadconn = NULL;
 <at>  <at>  -3022,7 +3022,7  <at>  <at>  int iscsi_conn_start(struct iscsi_cls_conn *cls_conn)
 		mod_timer(&conn->transport_timer,
 			  jiffies + (conn->recv_timeout * HZ));

-	switch(conn->stop_stage) {
+	switch (conn->stop_stage) {
 	case STOP_CONN_RECOVER:
 		/*
 		 * unblock eh_abort() if it is blocked. re-try all
 <at>  <at>  -3197,7 +3197,7  <at>  <at>  int iscsi_set_param(struct iscsi_cls_conn *cls_conn,
 	struct iscsi_session *session = conn->session;
 	int val;

-	switch(param) {
+	switch (param) {
 	case ISCSI_PARAM_FAST_ABORT:
 		sscanf(buf, "%d", &session->fast_abort);
 		break;
 <at>  <at>  -3310,7 +3310,7  <at>  <at>  int iscsi_session_get_param(struct iscsi_cls_session *cls_session,
 	struct iscsi_session *session = cls_session->dd_data;
 	int len;

-	switch(param) {
+	switch (param) {
 	case ISCSI_PARAM_FAST_ABORT:
 		len = sprintf(buf, "%d\n", session->fast_abort);
 		break;
 <at>  <at>  -3488,7 +3488,7  <at>  <at>  int iscsi_conn_get_param(struct iscsi_cls_conn *cls_conn,
 	struct iscsi_conn *conn = cls_conn->dd_data;
 	int len;

-	switch(param) {
+	switch (param) {
 	case ISCSI_PARAM_PING_TMO:
 		len = sprintf(buf, "%u\n", conn->ping_timeout);
 		break;
-- 
2.6.6

--

-- 
You received this message because you are subscribed to the Google Groups "open-iscsi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to open-iscsi+unsubscribe@...
To post to this group, send email to open-iscsi@...
Visit this group at https://groups.google.com/group/open-iscsi.
For more options, visit https://groups.google.com/d/optout.

adheer.chandravanshi | 22 Apr 18:33 2016

iscsi tools: Support for host statistics

From: Adheer Chandravanshi <adheer.chandravanshi@...>

The following patch obsoletes the patchset posted earlier for
host stats.

This patch is based on kernel-based solution for host stats and
depends on following patches posted on linux-scsi list:
  scsi_transport_iscsi: Add support for stats param at host level
  libiscsi: Add support to update host stats param
  bnx2i: Enable support for host stats param

Adheer Chandravanshi (1):
  iscsiadm: Add support to show host stats from sysfs

 include/iscsi_if.h |   24 ++++++++++++++
 usr/idbm.c         |   39 +++++++++++++++++++++++
 usr/idbm.h         |    4 ++-
 usr/idbm_fields.h  |   13 ++++++++
 usr/iscsi_sysfs.c  |   86 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 usr/iscsi_sysfs.h  |    3 ++
 usr/iscsiadm.c     |   41 ++++++++++++++++++++-----
 usr/transport.c    |    1 +
 usr/transport.h    |    1 +
 9 files changed, 203 insertions(+), 9 deletions(-)

--

-- 
You received this message because you are subscribed to the Google Groups "open-iscsi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to open-iscsi+unsubscribe@...
To post to this group, send email to open-iscsi@...
Visit this group at https://groups.google.com/group/open-iscsi.
For more options, visit https://groups.google.com/d/optout.

adheer.chandravanshi | 22 Apr 15:39 2016

[PATCH 0/3] iscsi: Add statistics support for iscsi host

From: Adheer Chandravanshi <adheer.chandravanshi@...>

The following patches add the support to maintain some iscsi initiator
stats at the iscsi host level. The stats will be exposed using iscsi
host sysfs attrs.

This adds support for following stats:
       ISCSI_HOST_PARAM_LOGIN_ACCEPT_RSPS
       ISCSI_HOST_PARAM_LOGIN_OTHER_FAILS
       ISCSI_HOST_PARAM_LOGIN_AUTHENTICATION_FAILS
       ISCSI_HOST_PARAM_LOGIN_AUTHORIZATION_FAILS
       ISCSI_HOST_PARAM_LOGIN_NEGOTIATION_FAILS
       ISCSI_HOST_PARAM_LOGIN_REDIRECT_RSPS
       ISCSI_HOST_PARAM_LOGOUT_NORMAL_RSPS
       ISCSI_HOST_PARAM_LOGOUT_OTHER_RSPS
       ISCSI_HOST_PARAM_DIGEST_ERR
       ISCSI_HOST_PARAM_TIMEOUT_ERR
       ISCSI_HOST_PARAM_FORMAT_ERR
       ISCSI_HOST_PARAM_SESSION_FAILS

Adheer Chandravanshi (3):
  scsi_transport_iscsi: Add support for stats param at host level
  libiscsi: Add support to update host stats param
  bnx2i: Enable support for host stats param

--

-- 
You received this message because you are subscribed to the Google Groups "open-iscsi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to open-iscsi+unsubscribe@...
To post to this group, send email to open-iscsi@...
Visit this group at https://groups.google.com/group/open-iscsi.
For more options, visit https://groups.google.com/d/optout.

Chris Leech | 20 Apr 20:13 2016
Picon

github repo, picking up patches from this list

I've pushed some of my recent patches as well as a few others I picked
up from the list to my github repo https://github.com/cleech/open-iscsi

This is what's currently added there. If there's anything else that's
been reviewed on the list that needs to be applied let me know and I'll
add it.

Chris Leech (6):
      iscsi_tcp set SO_LINGER to abort connection for error handling
      iscsiadm: fix parallel rescan handling of exit codes
      iscsistart: support booting over a VLAN
      iscsid: safe_logout fix device path canonicalization by using libmount cache
      iscsid: make safe_logut session checks apply for flashnode session
      remove sysfs attr_list

Christian Seiler (1):
      Build system: sort object file lists

Lee Duncan (1):
      ARP table too small when switches involved.

--

-- 
You received this message because you are subscribed to the Google Groups "open-iscsi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to open-iscsi+unsubscribe@...
To post to this group, send email to open-iscsi@...
Visit this group at https://groups.google.com/group/open-iscsi.
For more options, visit https://groups.google.com/d/optout.

Chris Leech | 12 Apr 22:23 2016
Picon

[PATCH 1/5] iscsiadm: fix parallel rescan handling of exit codes

The parallel rescan patches work, in so much as the rescans happen, but
if a target is specified the non-matching cases cause warning to be
printed and a non-zero exit code.

To reproduce: have more than one session to different targets, issue a
node mode rescan command to one of them (-m node -T <iqn.target> -R).

The problem is that while exit() takes an int, only the low byte is part
of the exit code and it's combined with other exit status information.
iscsiadm tries to use exit(-1) to indicate a non-match (not a fatal
error). The value retrieved with wait() after an exit(-1) is actually
65280.

Fix this by making use of the wait.h macros for checking the exit code.

Signed-off-by: Chris Leech <cleech@...>
---
 include/iscsi_err.h |  2 ++
 usr/iscsi_err.c     |  1 +
 usr/iscsi_sysfs.c   | 20 +++++++++++++++++---
 3 files changed, 20 insertions(+), 3 deletions(-)

diff --git a/include/iscsi_err.h b/include/iscsi_err.h
index 125f443..506bd8c 100644
--- a/include/iscsi_err.h
+++ b/include/iscsi_err.h
 <at>  <at>  -66,6 +66,8  <at>  <at>  enum {
 	ISCSI_ERR_AGAIN			= 29,
 	/* unknown discovery type */
 	ISCSI_ERR_UNKNOWN_DISCOVERY_TYPE = 30,
+	/* child process terminated */
+	ISCSI_ERR_CHILD_TERMINATED	= 31,

 	/* Always last. Indicates end of error code space */
 	ISCSI_MAX_ERR_VAL,
diff --git a/usr/iscsi_err.c b/usr/iscsi_err.c
index 11e0348..1ba9e64 100644
--- a/usr/iscsi_err.c
+++ b/usr/iscsi_err.c
 <at>  <at>  -53,6 +53,7  <at>  <at>  static char *iscsi_err_msgs[] = {
 	/* 28 */ "device or resource in use",
 	/* 29 */ "operation failed but retry may succeed",
 	/* 30 */ "unknown discovery type",
+	/* 31 */ "child process terminated",
 };

 char *iscsi_err_to_str(int err)
diff --git a/usr/iscsi_sysfs.c b/usr/iscsi_sysfs.c
index 3a37a48..a8fe156 100644
--- a/usr/iscsi_sysfs.c
+++ b/usr/iscsi_sysfs.c
 <at>  <at>  -1472,13 +1472,27  <at>  <at>  int iscsi_sysfs_for_each_session(void *data, int *nr_found,
 				break;
 			}

-			if ((chldrc > 0) && (rc == 0)) {
+			if (!WIFEXITED(chldrc)) {
 				/*
+				 * abnormal termination (signal, exception, etc.)
+				 *
 				 * The non-parallel code path returns the first
 				 * error so this keeps the same semantics.
 				 */
-				rc = chldrc;
-			} else if (chldrc == 0) {
+				if (rc == 0)
+					rc = ISCSI_ERR_CHILD_TERMINATED;
+			} else if ((WEXITSTATUS(chldrc) != 0) &&
+			           (WEXITSTATUS(chldrc) != 255)) {
+				/*
+				 * 0 is success
+				 * 255 is a truncated return code from exit(-1)
+				 *     and means no match
+				 * anything else (this case) is an error
+				 */
+				if (rc == 0)
+					rc = WEXITSTATUS(chldrc);
+			} else if (WEXITSTATUS(chldrc) == 0) {
+				/* success */
 				(*nr_found)++;
 			}
 		}
-- 
2.5.5

--

-- 
You received this message because you are subscribed to the Google Groups "open-iscsi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to open-iscsi+unsubscribe@...
To post to this group, send email to open-iscsi@...
Visit this group at https://groups.google.com/group/open-iscsi.
For more options, visit https://groups.google.com/d/optout.

David Bond | 4 Apr 22:09 2016
Gravatar

Subject: [PATCH v2] ibft: Expose iBFT acpi header via sysfs


Some ethernet adapter vendors are supplying products which support optional
(payed license) features. On some adapters this includes a hardware iscsi
initiator.  The same adapters in a normal (no extra licenses) mode of
operation can be used as a software iscsi initiator.  In addition, software
iscsi boot initiators are becoming a standard part of many vendors uefi
implementations.  This is creating difficulties during early boot/install
determining the proper configuration method for these adapters when they
are used as a boot device.

The attached patch creates sysfs entries to expose information from the
acpi header of the ibft table.  This information allows for a method to
easily determining if an ibft table was created by a ethernet card's
firmware or the system uefi/bios.  In the case of a hardware initiator this
information in combination with the pci vendor and device id can be used
to ascertain any vendor specific behaviors that need to be accommodated.

Reviewed-by: Lee Duncan <lduncan@...>
Signed-off-by: David Bond <dbond@...>
---
 Documentation/ABI/testing/sysfs-ibft | 10 ++++++
 drivers/firmware/iscsi_ibft.c        | 67 +++++++++++++++++++++++++++++++++++-
 drivers/scsi/iscsi_boot_sysfs.c      | 62 +++++++++++++++++++++++++++++++++
 include/linux/iscsi_boot_sysfs.h     | 13 +++++++
 4 files changed, 151 insertions(+), 1 deletion(-)

diff --git a/Documentation/ABI/testing/sysfs-ibft b/Documentation/ABI/testing/sysfs-ibft
index cac3930..7d6725f 100644
--- a/Documentation/ABI/testing/sysfs-ibft
+++ b/Documentation/ABI/testing/sysfs-ibft
 <at>  <at>  -21,3 +21,13  <at>  <at>  Contact:	Konrad Rzeszutek <ketuzsezr@...>
 Description:	The /sys/firmware/ibft/ethernetX directory will contain
 		files that expose the iSCSI Boot Firmware Table NIC data.
 		Usually this contains the IP address, MAC, and gateway of the NIC.
+
+What:		/sys/firmware/ibft/acpi_header
+Date:		March 2016
+Contact:	David Bond <dbond@...>
+Description:	The /sys/firmware/ibft/acpi_header directory will contain files
+		that expose the SIGNATURE, OEM_ID, and OEM_TABLE_ID fields of the
+		acpi table header of the iBFT structure.  This will allow for
+		identification of the creator of the table which is useful in
+		determining quirks associated with some adapters when used in
+		hardware vs software iscsi initiator mode.
diff --git a/drivers/firmware/iscsi_ibft.c b/drivers/firmware/iscsi_ibft.c
index 81037e5..671831d 100644
--- a/drivers/firmware/iscsi_ibft.c
+++ b/drivers/firmware/iscsi_ibft.c
 <at>  <at>  -418,6 +418,31  <at>  <at>  static ssize_t ibft_attr_show_target(void *data, int type, char *buf)
 	return str - buf;
 }

+static ssize_t ibft_attr_show_acpitbl(void *data, int type, char *buf)
+{
+	struct ibft_kobject *entry = data;
+	char *str = buf;
+
+	switch (type) {
+	case ISCSI_BOOT_ACPITBL_SIGNATURE:
+		str += sprintf_string(str, ACPI_NAME_SIZE,
+				      entry->header->header.signature);
+		break;
+	case ISCSI_BOOT_ACPITBL_OEM_ID:
+		str += sprintf_string(str, ACPI_OEM_ID_SIZE,
+				      entry->header->header.oem_id);
+		break;
+	case ISCSI_BOOT_ACPITBL_OEM_TABLE_ID:
+		str += sprintf_string(str, ACPI_OEM_TABLE_ID_SIZE,
+				      entry->header->header.oem_table_id);
+		break;
+	default:
+		break;
+	}
+
+	return str - buf;
+}
+
 static int __init ibft_check_device(void)
 {
 	int len;
 <at>  <at>  -576,6 +601,24  <at>  <at>  static umode_t __init ibft_check_initiator_for(void *data, int type)
 	return rc;
 }

+static umode_t __init ibft_check_acpitbl_for(void *data, int type)
+{
+
+	umode_t rc = 0;
+
+	switch (type) {
+	case ISCSI_BOOT_ACPITBL_SIGNATURE:
+	case ISCSI_BOOT_ACPITBL_OEM_ID:
+	case ISCSI_BOOT_ACPITBL_OEM_TABLE_ID:
+		rc = S_IRUGO;
+		break;
+	default:
+		break;
+	}
+
+	return rc;
+}
+
 static void ibft_kobj_release(void *data)
 {
 	kfree(data);
 <at>  <at>  -699,6 +742,8  <at>  <at>  free_ibft_obj:
 static int __init ibft_register_kobjects(struct acpi_table_ibft *header)
 {
 	struct ibft_control *control = NULL;
+	struct iscsi_boot_kobj *boot_kobj;
+	struct ibft_kobject *ibft_kobj;
 	void *ptr, *end;
 	int rc = 0;
 	u16 offset;
 <at>  <at>  -727,6 +772,26  <at>  <at>  static int __init ibft_register_kobjects(struct acpi_table_ibft *header)
 		}
 	}

+	if (rc)
+		return rc;
+
+	ibft_kobj = kzalloc(sizeof(*ibft_kobj), GFP_KERNEL);
+	if (!ibft_kobj)
+		return -ENOMEM;
+
+	ibft_kobj->header = header;
+	ibft_kobj->hdr = NULL; /*for ibft_unregister*/
+
+	boot_kobj = iscsi_boot_create_acpitbl(boot_kset, 0,
+					      ibft_kobj,
+					      ibft_attr_show_acpitbl,
+					      ibft_check_acpitbl_for,
+					      ibft_kobj_release);
+	if (!boot_kobj)  {
+		kfree(ibft_kobj);
+		rc = -ENOMEM;
+	}
+
 	return rc;
 }

 <at>  <at>  -738,7 +803,7  <at>  <at>  static void ibft_unregister(void)
 	list_for_each_entry_safe(boot_kobj, tmp_kobj,
 				 &boot_kset->kobj_list, list) {
 		ibft_kobj = boot_kobj->data;
-		if (ibft_kobj->hdr->id == id_nic)
+		if (ibft_kobj->hdr && ibft_kobj->hdr->id == id_nic)
 			sysfs_remove_link(&boot_kobj->kobj, "device");
 	};
 }
diff --git a/drivers/scsi/iscsi_boot_sysfs.c b/drivers/scsi/iscsi_boot_sysfs.c
index 8f0ea97..d453667 100644
--- a/drivers/scsi/iscsi_boot_sysfs.c
+++ b/drivers/scsi/iscsi_boot_sysfs.c
 <at>  <at>  -306,6 +306,42  <at>  <at>  static struct attribute_group iscsi_boot_initiator_attr_group = {
 	.is_visible = iscsi_boot_ini_attr_is_visible,
 };

+/* iBFT ACPI Table attributes */
+iscsi_boot_rd_attr(acpitbl_signature, signature, ISCSI_BOOT_ACPITBL_SIGNATURE);
+iscsi_boot_rd_attr(acpitbl_oem_id, oem_id, ISCSI_BOOT_ACPITBL_OEM_ID);
+iscsi_boot_rd_attr(acpitbl_oem_table_id, oem_table_id,
+		   ISCSI_BOOT_ACPITBL_OEM_TABLE_ID);
+
+static struct attribute *acpitbl_attrs[] = {
+	&iscsi_boot_attr_acpitbl_signature.attr,
+	&iscsi_boot_attr_acpitbl_oem_id.attr,
+	&iscsi_boot_attr_acpitbl_oem_table_id.attr,
+	NULL
+};
+
+static umode_t iscsi_boot_acpitbl_attr_is_visible(struct kobject *kobj,
+					     struct attribute *attr, int i)
+{
+	struct iscsi_boot_kobj *boot_kobj =
+			container_of(kobj, struct iscsi_boot_kobj, kobj);
+
+	if (attr ==  &iscsi_boot_attr_acpitbl_signature.attr)
+		return boot_kobj->is_visible(boot_kobj->data,
+					     ISCSI_BOOT_ACPITBL_SIGNATURE);
+	if (attr ==  &iscsi_boot_attr_acpitbl_oem_id.attr)
+		return boot_kobj->is_visible(boot_kobj->data,
+					     ISCSI_BOOT_ACPITBL_OEM_ID);
+	if (attr ==  &iscsi_boot_attr_acpitbl_oem_table_id.attr)
+		return boot_kobj->is_visible(boot_kobj->data,
+					     ISCSI_BOOT_ACPITBL_OEM_TABLE_ID);
+	return 0;
+}
+
+static struct attribute_group iscsi_boot_acpitbl_attr_group = {
+	.attrs = acpitbl_attrs,
+	.is_visible = iscsi_boot_acpitbl_attr_is_visible,
+};
+
 static struct iscsi_boot_kobj *
 iscsi_boot_create_kobj(struct iscsi_boot_kset *boot_kset,
 		       struct attribute_group *attr_group,
 <at>  <at>  -436,6 +472,32  <at>  <at>  iscsi_boot_create_ethernet(struct iscsi_boot_kset *boot_kset, int index,
 EXPORT_SYMBOL_GPL(iscsi_boot_create_ethernet);

 /**
+ * iscsi_boot_create_acpitbl() - create boot acpi table sysfs dir
+ *  <at> boot_kset: boot kset
+ *  <at> index: not used
+ *  <at> data: driver specific data
+ *  <at> show: attr show function
+ *  <at> is_visible: attr visibility function
+ *  <at> release: release function
+ *
+ * Note: The boot sysfs lib will free the data passed in for the caller
+ * when all refs to the acpitbl kobject have been released.
+ */
+struct iscsi_boot_kobj *
+iscsi_boot_create_acpitbl(struct iscsi_boot_kset *boot_kset, int index,
+			   void *data,
+			   ssize_t (*show)(void *data, int type, char *buf),
+			   umode_t (*is_visible)(void *data, int type),
+			   void (*release)(void *data))
+{
+	return iscsi_boot_create_kobj(boot_kset,
+				      &iscsi_boot_acpitbl_attr_group,
+				      "acpi_header", index, data, show,
+				      is_visible, release);
+}
+EXPORT_SYMBOL_GPL(iscsi_boot_create_acpitbl);
+
+/**
  * iscsi_boot_create_kset() - creates root sysfs tree
  *  <at> set_name: name of root dir
  */
diff --git a/include/linux/iscsi_boot_sysfs.h b/include/linux/iscsi_boot_sysfs.h
index 548d553..10923d7 100644
--- a/include/linux/iscsi_boot_sysfs.h
+++ b/include/linux/iscsi_boot_sysfs.h
 <at>  <at>  -64,6 +64,12  <at>  <at>  enum iscsi_boot_initiator_properties_enum {
 	ISCSI_BOOT_INI_END_MARKER,
 };

+enum iscsi_boot_acpitbl_properties_enum {
+	ISCSI_BOOT_ACPITBL_SIGNATURE,
+	ISCSI_BOOT_ACPITBL_OEM_ID,
+	ISCSI_BOOT_ACPITBL_OEM_TABLE_ID,
+};
+
 struct attribute_group;

 struct iscsi_boot_kobj {
 <at>  <at>  -127,6 +133,13  <at>  <at>  iscsi_boot_create_target(struct iscsi_boot_kset *boot_kset, int index,
 			 umode_t (*is_visible) (void *data, int type),
 			 void (*release) (void *data));

+struct iscsi_boot_kobj *
+iscsi_boot_create_acpitbl(struct iscsi_boot_kset *boot_kset, int index,
+			  void *data,
+			  ssize_t (*show)(void *data, int type, char *buf),
+			  umode_t (*is_visible)(void *data, int type),
+			  void (*release)(void *data));
+
 struct iscsi_boot_kset *iscsi_boot_create_kset(const char *set_name);
 struct iscsi_boot_kset *iscsi_boot_create_host_kset(unsigned int hostno);
 void iscsi_boot_destroy_kset(struct iscsi_boot_kset *boot_kset);
-- 
2.6.2

--

-- 
You received this message because you are subscribed to the Google Groups "open-iscsi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to open-iscsi+unsubscribe@...
To post to this group, send email to open-iscsi@...
Visit this group at https://groups.google.com/group/open-iscsi.
For more options, visit https://groups.google.com/d/optout.

Richard Sharpe | 31 Mar 04:01 2016
Picon

Patch: It is not necessary to try to increase the priority of the wq thread from userspace

Hi folks,

We recently found that iscsid was iterating through /proc/≤pid>/stat
looking for the workqueue iscsi-q-NN and then setting its nice value
to -20.

Then we investigated some more because it seemed like this could be
more easily done from the kernel.

What we discovered is that with modern Linux kernels, at least since
3.10.0 and possibly earlier, the thread called <wq-name> is not the
actual workqueue thread, it is the rescue thread for the workqueue,
and it already runs at -20!

Indeed, the work items are handled on a pool of threads.

This patch removes that call and code as it is redundant and actually
causes things to take longer and is a problem when you are trying to
start hundreds of iSCSI sessions.

There is another patch for the LLD to use a WQ_HIGHPRI queue to
achieve the original intent.

-- 
Regards,
Richard Sharpe
(何以解憂?唯有杜康。--曹操)

--

-- 
You received this message because you are subscribed to the Google Groups "open-iscsi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to open-iscsi+unsubscribe@...
To post to this group, send email to open-iscsi@...
Visit this group at https://groups.google.com/group/open-iscsi.
For more options, visit https://groups.google.com/d/optout.

Gmane