*/
#define SAN_DEFAULT_RETRIES 10
+/**
+ * Delay between reopening attempts
+ *
+ * Some SAN targets will always accept connections instantly and
+ * report a temporary unavailability by e.g. failing the TEST UNIT
+ * READY command. Avoid bombarding such targets by introducing a
+ * small delay between attempts.
+ */
+#define SAN_REOPEN_DELAY_SECS 5
+
/** List of SAN devices */
LIST_HEAD ( san_devices );
/* Reopen block device if applicable */
if ( sandev_needs_reopen ( sandev ) &&
( ( rc = sandev_reopen ( sandev ) ) != 0 ) ) {
+
+ /* Delay reopening attempts */
+ sleep_fixed ( SAN_REOPEN_DELAY_SECS );
+
continue;
}