[Pkg-iscsi-maintainers] [SCM] Debian Open-iSCSI Packaging branch, upstream-mnc, updated. 2.0-872-193-gde2c0e7

Mike Christie michaelc at cs.wisc.edu
Sat Apr 7 15:43:37 UTC 2012


The following commit has been merged in the upstream-mnc branch:
commit 51cab9ce2163eb8d798b1511b7df9141af8ff17c
Author: Jim Ramsay <jim_ramsay at dell.com>
Date:   Wed Jul 20 09:06:43 2011 -0400

    Check all ifaces during discovery even if some timeout
    
    Any errors in the discovery process would previously cause a
    short-circuit jump out of the main per-interface loop.  There are some
    error conditions which should not be fatal to the process (such as if
    the portal we are trying to discover is not reachable on one of a number
    of interfaces), so allow the other ifaces to still be tried in those
    cases.
    
    Signed-off-by: Jim Ramsay <jim_ramsay at dell.com>

diff --git a/usr/idbm.c b/usr/idbm.c
index cca32e2..4f78250 100644
--- a/usr/idbm.c
+++ b/usr/idbm.c
@@ -1879,6 +1879,20 @@ static int idbm_bind_iface_to_nodes(idbm_disc_nodes_fn *disc_node_fn,
 	return 0;
 }
 
+static int
+discovery_error_fatal(int err)
+{
+	switch (err) {
+	/* No error */
+	case ISCSI_SUCCESS:
+	/* Transport errors or timeouts are not fatal */
+	case ISCSI_ERR_TRANS:
+	case ISCSI_ERR_TRANS_TIMEOUT:
+		return 0;
+	}
+	return 1;
+}
+
 int idbm_bind_ifaces_to_nodes(idbm_disc_nodes_fn *disc_node_fn,
 			      void *data, struct list_head *ifaces,
 			      struct list_head *bound_recs)
@@ -1910,7 +1924,7 @@ int idbm_bind_ifaces_to_nodes(idbm_disc_nodes_fn *disc_node_fn,
 			rc = idbm_bind_iface_to_nodes(disc_node_fn, data, iface,
 						      bound_recs);
 			free(iface);
-			if (rc)
+			if (discovery_error_fatal(rc))
 				goto fail;
 			found = 1;
 		}
@@ -1937,7 +1951,7 @@ int idbm_bind_ifaces_to_nodes(idbm_disc_nodes_fn *disc_node_fn,
 
 			rc = idbm_bind_iface_to_nodes(disc_node_fn, data, iface,
 						      bound_recs);
-			if (rc)
+			if (discovery_error_fatal(rc))
 				goto fail;
 		}
 	}

-- 
Debian Open-iSCSI Packaging



More information about the Pkg-iscsi-maintainers mailing list