Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 4 Jul 2001 00:13:04 -0700 (PDT)
From:      Matthew Jacob <mjacob@feral.com>
To:        scsi@freebsd.org
Cc:        audit@freebsd.org
Subject:   tunable retry count for DA
Message-ID:  <Pine.BSF.4.21.0107040011230.8572-100000@beppo>

next in thread | raw e-mail | index | archive | help

This change implements a sysctl for setting the retry count for normal
I/O for scsi_da- this is useful if you're working with noisy Fibre
Channel Loops.

The principal node, cam, overlaps the same definition in scsi_cd. They
probably ought to be moved to someplace else.

Index: cam/scsi/scsi_da.c
===================================================================
RCS file: /home/ncvs/src/sys/cam/scsi/scsi_da.c,v
retrieving revision 1.73
diff -u -r1.73 scsi_da.c
--- cam/scsi/scsi_da.c	2001/07/04 05:22:42	1.73
+++ cam/scsi/scsi_da.c	2001/07/04 07:11:13
@@ -38,6 +38,7 @@
 #include <sys/systm.h>
 #include <sys/kernel.h>
 #include <sys/bio.h>
+#include <sys/sysctl.h>
 #endif /* _KERNEL */
 
 #include <sys/devicestat.h>
@@ -277,6 +278,18 @@
 #define DA_DEFAULT_TIMEOUT 60	/* Timeout in seconds */
 #endif
 
+#ifndef	DA_DEFAULT_RETRY
+#define	DA_DEFAULT_RETRY	4
+#endif
+
+static int da_retry_count = DA_DEFAULT_RETRY;
+
+SYSCTL_NODE(_kern, OID_AUTO, cam, CTLFLAG_RD, 0, "CAM Subsystem");
+SYSCTL_NODE(_kern_cam, OID_AUTO, da, CTLFLAG_RD, 0,
+            "CAM Direct Access Disk driver");
+SYSCTL_INT(_kern_cam_da, OID_AUTO, retry_count, CTLFLAG_RW,
+           &da_retry_count, 0, "Normal I/O retry count");
+
 /*
  * DA_ORDEREDTAG_INTERVAL determines how often, relative
  * to the default timeout, we check to see whether an ordered
@@ -1103,7 +1116,7 @@
 				tag_code = MSG_SIMPLE_Q_TAG;
 			}
 			scsi_read_write(&start_ccb->csio,
-					/*retries*/4, /* retry a few times */
+					/*retries*/da_retry_count,
 					dadone,
 					tag_code,
 					bp->bio_cmd == BIO_READ,


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-audit" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0107040011230.8572-100000>