87 lines
3.3 KiB
Diff
87 lines
3.3 KiB
Diff
diff -aurp open-iscsi-5.0.5.595/usr/config.h open-iscsi-5.0.5.574/usr/config.h
|
|
--- open-iscsi-5.0.5.595/usr/config.h 2006-05-30 02:02:29.000000000 -0500
|
|
+++ open-iscsi-5.0.5.574/usr/config.h 2006-05-18 22:50:25.000000000 -0500
|
|
@@ -43,7 +43,8 @@
|
|
#define ISCSI_CONN_MAX 16
|
|
|
|
/* database version control */
|
|
-#define IDBM_VERSION 0x05
|
|
+/* To maintain backwards compat with earlier DBs we do some tricks */
|
|
+#define IDBM_VERSION 0x04
|
|
|
|
/* the following structures store the options set in the config file.
|
|
* a structure is defined for each logically-related group of options.
|
|
@@ -141,7 +142,6 @@ struct iscsi_sendtargets_config {
|
|
int port;
|
|
int continuous;
|
|
int send_async_text;
|
|
- int reopen_max;
|
|
struct iscsi_auth_config auth;
|
|
struct iscsi_connection_timeout_config conn_timeo;
|
|
};
|
|
diff -aurp open-iscsi-5.0.5.595/usr/discovery.c open-iscsi-5.0.5.574/usr/discovery.c
|
|
--- open-iscsi-5.0.5.595/usr/discovery.c 2006-05-30 02:02:29.000000000 -0500
|
|
+++ open-iscsi-5.0.5.574/usr/discovery.c 2006-05-18 20:04:12.000000000 -0500
|
|
@@ -644,6 +644,13 @@ soonest_msecs(struct timeval *t1, struct
|
|
return (m2 < m3) ? m2 : m3;
|
|
}
|
|
|
|
+/*
|
|
+ * tmp hack: open-iscsi does not support DB updates. Upstream has changed
|
|
+ * the DB format, so instead of jerking feodora users around we just set
|
|
+ * that configurable value to some safe default
|
|
+ */
|
|
+#define DISC_REOPEN_MAX 5
|
|
+
|
|
static iscsi_session_t *
|
|
init_new_session(struct iscsi_sendtargets_config *config)
|
|
{
|
|
@@ -670,7 +677,7 @@ init_new_session(struct iscsi_sendtarget
|
|
session->conn[0].max_recv_dlength = DEFAULT_MAX_RECV_DATA_SEGMENT_LENGTH;
|
|
session->conn[0].max_xmit_dlength = DEFAULT_MAX_RECV_DATA_SEGMENT_LENGTH;
|
|
|
|
- session->reopen_cnt = config->reopen_max;
|
|
+ session->reopen_cnt = DISC_REOPEN_MAX;
|
|
|
|
/* OUI and uniqifying number */
|
|
session->isid[0] = DRIVER_ISID_0;
|
|
@@ -1120,7 +1127,7 @@ reconnect:
|
|
|
|
if (--session->reopen_cnt < 0) {
|
|
log_error("connection login retries (reopen_max) %d exceeded",
|
|
- config->reopen_max);
|
|
+ DISC_REOPEN_MAX);
|
|
return 1;
|
|
}
|
|
|
|
diff -aurp open-iscsi-5.0.5.595/usr/idbm.c open-iscsi-5.0.5.574/usr/idbm.c
|
|
--- open-iscsi-5.0.5.595/usr/idbm.c 2006-05-30 02:02:29.000000000 -0500
|
|
+++ open-iscsi-5.0.5.574/usr/idbm.c 2006-05-18 20:04:12.000000000 -0500
|
|
@@ -264,8 +264,6 @@ idbm_update_discovery(discovery_rec_t *r
|
|
__update_rec_int(rec, newrec,
|
|
u.sendtargets.conn_timeo.login_timeout);
|
|
__update_rec_int(rec, newrec,
|
|
- u.sendtargets.reopen_max);
|
|
- __update_rec_int(rec, newrec,
|
|
u.sendtargets.conn_timeo.auth_timeout);
|
|
__update_rec_int(rec, newrec,
|
|
u.sendtargets.conn_timeo.active_timeout);
|
|
@@ -659,9 +657,6 @@ idbm_recinfo_discovery(discovery_rec_t *
|
|
__recinfo_int("discovery.sendtargets.timeo.login_timeout",ri, r,
|
|
u.sendtargets.conn_timeo.login_timeout,
|
|
IDBM_SHOW, num);
|
|
- __recinfo_int("discovery.sendtargets.reopen_max",ri, r,
|
|
- u.sendtargets.reopen_max,
|
|
- IDBM_SHOW, num);
|
|
__recinfo_int("discovery.sendtargets.timeo.auth_timeout", ri, r,
|
|
u.sendtargets.conn_timeo.auth_timeout,
|
|
IDBM_SHOW, num);
|
|
@@ -900,7 +895,6 @@ idbm_discovery_setup_defaults(discovery_
|
|
if (type == DISCOVERY_TYPE_SENDTARGETS) {
|
|
rec->u.sendtargets.continuous = 0;
|
|
rec->u.sendtargets.send_async_text = 0;
|
|
- rec->u.sendtargets.reopen_max = 5;
|
|
rec->u.sendtargets.auth.authmethod = 0;
|
|
rec->u.sendtargets.auth.password_length = 0;
|
|
rec->u.sendtargets.auth.password_in_length = 0;
|