Module Name:    src
Committed By:   tls
Date:           Thu Sep 25 00:30:45 UTC 2014

Modified Files:
        src/sys/dev/iscsi: iscsi_send.c

Log Message:
The "throttling" code in the in-kernel iSCSI initiator is very questionable;
it sleeps on a ccb that appears highly unlikely to wake up, since it seems
to be waiting to _submit_ that very ccb!  This is doubtless why someone tried
to disable it in the default case via several #defines.

Unfortunately one of those #defines is later tested backwards.  Fix that.
The in-kernel initiator now seems to survive a system build without hanging.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/dev/iscsi/iscsi_send.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/iscsi/iscsi_send.c
diff -u src/sys/dev/iscsi/iscsi_send.c:1.9 src/sys/dev/iscsi/iscsi_send.c:1.10
--- src/sys/dev/iscsi/iscsi_send.c:1.9	Fri Sep  5 09:27:34 2014
+++ src/sys/dev/iscsi/iscsi_send.c	Thu Sep 25 00:30:45 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: iscsi_send.c,v 1.9 2014/09/05 09:27:34 matt Exp $	*/
+/*	$NetBSD: iscsi_send.c,v 1.10 2014/09/25 00:30:45 tls Exp $	*/
 
 /*-
  * Copyright (c) 2004,2005,2006,2011 The NetBSD Foundation, Inc.
@@ -1378,7 +1378,7 @@ send_command(ccb_t *ccb, ccb_disp_t disp
 
 	s = splbio();
 	while (/*CONSTCOND*/ISCSI_THROTTLING_ENABLED &&
-	    /*CONSTCOND*/ISCSI_SERVER_TRUSTED &&
+	    /*CONSTCOND*/!ISCSI_SERVER_TRUSTED &&
 	    !sn_a_le_b(sess->CmdSN, sess->MaxCmdSN)) {
 
 		ccb->disp = disp;

Reply via email to