[-]
[+]
|
Changed |
iscsi-initiator-utils.spec
|
|
[-]
[+]
|
Deleted |
iscsi-initiator-utils-Fix-connection-cleanup-when-iscsid-is-restarted.patch
^
|
@@ -1,94 +0,0 @@
-diff -aurp open-iscsi-2.0-868-test1/usr/initiator.c open-iscsi-2.0-868-test1.work/usr/initiator.c
---- open-iscsi-2.0-868-test1/usr/initiator.c 2008-03-03 09:36:11.000000000 -0600
-+++ open-iscsi-2.0-868-test1.work/usr/initiator.c 2008-03-03 09:39:17.000000000 -0600
-@@ -602,7 +602,10 @@ session_conn_shutdown(iscsi_conn_t *conn
- {
- iscsi_session_t *session = conn->session;
-
-- if (!conn->ksetup)
-+ if (session->id == -1)
-+ goto disconnect_conn;
-+
-+ if (!sysfs_session_has_leadconn(session->id))
- goto disconnect_conn;
-
- if (conn->state == STATE_IN_LOGIN ||
-@@ -623,7 +626,6 @@ session_conn_shutdown(iscsi_conn_t *conn
- log_error("can not safely destroy connection %d", conn->id);
- return MGMT_IPC_ERR_INTERNAL;
- }
-- conn->ksetup = 0;
-
- disconnect_conn:
- log_debug(2, "disconnect conn");
-@@ -1720,7 +1722,6 @@ static void session_conn_poll(void *data
- err = MGMT_IPC_ERR_INTERNAL;
- goto cleanup;
- }
-- conn->ksetup = 1;
- log_debug(3, "created new iSCSI connection "
- "%d:%d", session->id, conn->id);
- }
-diff -aurp open-iscsi-2.0-868-test1/usr/initiator.h open-iscsi-2.0-868-test1.work/usr/initiator.h
---- open-iscsi-2.0-868-test1/usr/initiator.h 2008-03-03 09:36:11.000000000 -0600
-+++ open-iscsi-2.0-868-test1.work/usr/initiator.h 2008-03-03 09:39:17.000000000 -0600
-@@ -116,7 +116,6 @@ struct iscsi_conn_context;
- /* daemon's connection structure */
- typedef struct iscsi_conn {
- uint32_t id;
-- int ksetup;
- struct iscsi_session *session;
- iscsi_login_context_t login_context;
- struct iscsi_conn_context *recv_context;
-diff -aurp open-iscsi-2.0-868-test1/usr/iscsi_sysfs.c open-iscsi-2.0-868-test1.work/usr/iscsi_sysfs.c
---- open-iscsi-2.0-868-test1/usr/iscsi_sysfs.c 2008-03-03 09:36:11.000000000 -0600
-+++ open-iscsi-2.0-868-test1.work/usr/iscsi_sysfs.c 2008-03-03 09:39:17.000000000 -0600
-@@ -38,6 +38,12 @@
-
- #define ISCSI_MAX_SYSFS_BUFFER NI_MAXHOST
-
-+/*
-+ * TODO: make this into a real API and check inputs better and add doc.
-+ * We should also use a common lib and search sysfs according to the sysfs
-+ * doc in the kernel documetnation.
-+ */
-+
- /* tmp buffer used by sysfs functions */
- static char sysfs_file[PATH_MAX];
- int num_transports = 0;
-@@ -439,6 +445,24 @@ free_info:
- return rc;
- }
-
-+/**
-+ * sysfs_session_has_leadconn - checks if session has lead conn in kernel
-+ * @sid: session id
-+ *
-+ * return 1 if session has lead conn and 0 if not.
-+ */
-+int sysfs_session_has_leadconn(uint32_t sid)
-+{
-+ struct stat statb;
-+
-+ memset(sysfs_file, 0, PATH_MAX);
-+ sprintf(sysfs_file, ISCSI_CONN_DIR"/connection%u:0", sid);
-+ if (!stat(sysfs_file, &statb))
-+ return 1;
-+ else
-+ return 0;
-+}
-+
- int get_sessioninfo_by_sysfs_id(struct session_info *info, char *session)
- {
- int ret, pers_failed = 0;
-diff -aurp open-iscsi-2.0-868-test1/usr/iscsi_sysfs.h open-iscsi-2.0-868-test1.work/usr/iscsi_sysfs.h
---- open-iscsi-2.0-868-test1/usr/iscsi_sysfs.h 2008-03-03 09:36:11.000000000 -0600
-+++ open-iscsi-2.0-868-test1.work/usr/iscsi_sysfs.h 2008-03-03 09:39:17.000000000 -0600
-@@ -53,6 +53,7 @@ extern int get_iscsi_kernel_version(char
- extern int check_class_version(void);
- extern int get_sessioninfo_by_sysfs_id(struct session_info *info,
- char *sys_session);
-+extern int sysfs_session_has_leadconn(uint32_t sid);
-
- typedef int (sysfs_session_op_fn)(void *, struct session_info *);
- typedef int (sysfs_host_op_fn)(void *, struct host_info *);
|
[-]
[+]
|
Deleted |
iscsi-initiator-utils-add-fw-login.patch
^
|
@@ -1,186 +0,0 @@
-diff -aurp open-iscsi-2.0-868-test1.orig/doc/iscsiadm.8 open-iscsi-2.0-868-test1/doc/iscsiadm.8
---- open-iscsi-2.0-868-test1.orig/doc/iscsiadm.8 2008-01-11 17:30:38.000000000 -0600
-+++ open-iscsi-2.0-868-test1/doc/iscsiadm.8 2008-01-11 17:51:12.000000000 -0600
-@@ -12,7 +12,7 @@ iscsiadm \- open-iscsi administration ut
-
- \fBiscsiadm\fR -m iface [ -hV ] [ -d debug_level ] [ -P printlevel ] [ -I ifacename ] [ [ -o operation ] [ -n name ] [ -v value ] ]
-
--\fBiscsiadm\fR -m fw
-+\fBiscsiadm\fR -m fw [-l]
-
- \fBiscsiadm\fR -k priority
-
-@@ -90,7 +90,7 @@ This command and iscsid's SIGTERM handli
-
- .TP
- \fB\-l\fR, \fB\-\-login\fR
--For node mode, login to a specified record. For discovery mode, login to
-+For node and fw mode, login to a specified record. For discovery mode, login to
- all discovered targets.
- .IP
- This option is only valid for discovery and node modes.
-diff -aurp open-iscsi-2.0-868-test1.orig/usr/iscsiadm.c open-iscsi-2.0-868-test1/usr/iscsiadm.c
---- open-iscsi-2.0-868-test1.orig/usr/iscsiadm.c 2008-01-11 17:30:38.000000000 -0600
-+++ open-iscsi-2.0-868-test1/usr/iscsiadm.c 2008-01-11 17:53:29.000000000 -0600
-@@ -102,6 +102,7 @@ iscsiadm -m node [ -hV ] [ -d debug_leve
- [ [ -o operation ] [ -n name ] [ -v value ] ]\n\
- iscsiadm -m session [ -hV ] [ -d debug_level ] [ -P printlevel] [ -r sessionid | sysfsdir [ -R | -u | -s ] [ -o operation ] [ -n name ] [ -v value ] ]\n\
- iscsiadm -m iface [ -hV ] [ -d debug_level ] [ -P printlevel ] [ -I ifacename ] [ [ -o operation ] [ -n name ] [ -v value ] ]\n\
-+iscsiadm -m fw [ -l ]\n\
- iscsiadm -k priority\n");
- }
- exit(status == 0 ? 0 : -1);
-@@ -1538,53 +1539,6 @@ static void print_fw_nodes(struct node_r
- }
- }
-
--static int do_fw_discovery(idbm_t *db, discovery_rec_t *drec, int do_login,
-- int info_level)
--{
-- struct boot_context context;
-- struct node_rec *rec;
-- int ret;
--
-- memset(&context, 0, sizeof(struct boot_context));
-- ret = fw_get_entry(&context, NULL);
-- if (ret) {
-- log_error("Could not read fw values.");
-- return ret;
-- }
-- /* tpgt hard coded to 1 */
-- rec = create_node_record(db, context.targetname, 1,
-- context.target_ipaddr, context.target_port,
-- NULL, 1);
-- if (!rec) {
-- log_error("Could not setup rec for fw discovery login.");
-- return ENOMEM;
-- }
--
-- /* todo - grab mac and set that here */
-- iface_init(&rec->iface);
-- strncpy(rec->iface.iname, context.initiatorname,
-- sizeof(context.initiatorname));
-- strncpy(rec->session.auth.username, context.chap_name,
-- sizeof(context.chap_name));
-- strncpy((char *)rec->session.auth.password, context.chap_password,
-- sizeof(context.chap_password));
-- strncpy(rec->session.auth.username_in, context.chap_name_in,
-- sizeof(context.chap_name_in));
-- strncpy((char *)rec->session.auth.password_in, context.chap_password_in,
-- sizeof(context.chap_password_in));
-- rec->session.auth.password_length =
-- strlen((char *)context.chap_password);
-- rec->session.auth.password_in_length =
-- strlen((char *)context.chap_password_in);
--
-- print_fw_nodes(rec, info_level);
-- if (do_login)
-- ret = login_portal(db, NULL, rec);
-- free(rec);
-- return ret;
--}
--
--
- static int isns_dev_attr_query(idbm_t *db, discovery_rec_t *drec,
- int info_level)
- {
-@@ -1887,10 +1841,46 @@ out:
- return rc;
- }
-
--static int exec_fw_op(void)
-+static struct node_rec *
-+fw_create_rec_by_entry(idbm_t *db, struct boot_context *context)
-+{
-+ struct node_rec *rec;
-+
-+ /* tpgt hard coded to 1 ??? */
-+ rec = create_node_record(db, context->targetname, 1,
-+ context->target_ipaddr, context->target_port,
-+ NULL, 1);
-+ if (!rec) {
-+ log_error("Could not setup rec for fw discovery login.");
-+ return NULL;
-+ }
-+
-+ /* todo - grab mac and set that here */
-+ iface_init(&rec->iface);
-+ strncpy(rec->iface.iname, context->initiatorname,
-+ sizeof(context->initiatorname));
-+ strncpy(rec->session.auth.username, context->chap_name,
-+ sizeof(context->chap_name));
-+ strncpy((char *)rec->session.auth.password, context->chap_password,
-+ sizeof(context->chap_password));
-+ strncpy(rec->session.auth.username_in, context->chap_name_in,
-+ sizeof(context->chap_name_in));
-+ strncpy((char *)rec->session.auth.password_in,
-+ context->chap_password_in,
-+ sizeof(context->chap_password_in));
-+ rec->session.auth.password_length =
-+ strlen((char *)context->chap_password);
-+ rec->session.auth.password_in_length =
-+ strlen((char *)context->chap_password_in);
-+ return rec;
-+}
-+
-+static int exec_fw_op(idbm_t *db, discovery_rec_t *drec, int do_login,
-+ int info_level)
- {
- struct boot_context context;
-- int ret;
-+ struct node_rec *rec;
-+ int ret = 0;
-
- memset(&context, 0, sizeof(struct boot_context));
- ret = fw_get_entry(&context, NULL);
-@@ -1899,8 +1889,22 @@ static int exec_fw_op(void)
- return ret;
- }
-
-- fw_print_entry(&context);
-- return 0;
-+ rec = fw_create_rec_by_entry(db, &context);
-+ if (!rec)
-+ return ENODEV;
-+
-+ /* if discovery, print nodes that were found. */
-+ if (drec)
-+ print_fw_nodes(rec, info_level);
-+
-+ if (do_login)
-+ ret = login_portal(db, NULL, rec);
-+ free(rec);
-+
-+ /* print the fw node info if called in fw mode with no params */
-+ if (!do_login && !drec)
-+ fw_print_entry(&context);
-+ return ret;
- }
-
- static int parse_sid(char *session)
-@@ -2106,14 +2110,14 @@ main(int argc, char **argv)
- usage(0);
-
- if (mode == MODE_FW) {
-- if ((rc = verify_mode_params(argc, argv, "m", 0))) {
-+ if ((rc = verify_mode_params(argc, argv, "ml", 0))) {
- log_error("fw mode: option '-%c' is not "
- "allowed/supported", rc);
- rc = -1;
- goto out;
- }
-
-- rc = exec_fw_op();
-+ rc = exec_fw_op(db, NULL, do_login, info_level);
- goto out;
- }
-
-@@ -2186,7 +2190,7 @@ main(int argc, char **argv)
- break;
- case DISCOVERY_TYPE_FWBOOT:
- drec.type = DISCOVERY_TYPE_FWBOOT;
-- if (do_fw_discovery(db, &drec, do_login, info_level))
-+ if (exec_fw_op(db, &drec, do_login, info_level))
- rc = -1;
- break;
- default:
|
[-]
[+]
|
Deleted |
iscsi-initiator-utils-add-info-compat.patch
^
|
@@ -1,64 +0,0 @@
-diff -aurp open-iscsi-2.0-868-test1/usr/iscsiadm.c open-iscsi-2.0-868-test1.tmp/usr/iscsiadm.c
---- open-iscsi-2.0-868-test1/usr/iscsiadm.c 2008-01-03 13:23:36.000000000 -0600
-+++ open-iscsi-2.0-868-test1.tmp/usr/iscsiadm.c 2008-01-03 14:11:15.000000000 -0600
-@@ -73,6 +73,7 @@ static struct option const long_options[
- {"value", required_argument, NULL, 'v'},
- {"sid", required_argument, NULL, 'r'},
- {"rescan", no_argument, NULL, 'R'},
-+ {"info", no_argument, NULL, 'i'},
- {"print", required_argument, NULL, 'P'},
- {"login", no_argument, NULL, 'l'},
- {"loginall", required_argument, NULL, 'L'},
-@@ -86,7 +87,7 @@ static struct option const long_options[
- {"help", no_argument, NULL, 'h'},
- {NULL, 0, NULL, 0},
- };
--static char *short_options = "RlVhm:p:P:T:H:I:U:k:L:d:r:n:v:o:sSt:u";
-+static char *short_options = "iRlVhm:p:P:T:H:I:U:k:L:d:r:n:v:o:sSt:u";
-
- static void usage(int status)
- {
-@@ -1960,6 +1961,7 @@ main(int argc, char **argv)
- int ch, longindex, mode=-1, port=-1, do_login=0, do_rescan=0;
- int rc=0, sid=-1, op=-1, type=-1, do_logout=0, do_stats=0, do_show=0;
- int do_login_all=0, do_logout_all=0, info_level=-1, num_ifaces = 0;
-+ int do_info=0;
- int tpgt = PORTAL_GROUP_TAG_UNKNOWN, killiscsid=-1;
- idbm_t *db = NULL;
- struct sigaction sa_old;
-@@ -2026,6 +2028,9 @@ main(int argc, char **argv)
- case 'R':
- do_rescan = 1;
- break;
-+ case 'i':
-+ do_info = 1;
-+ break;
- case 'P':
- info_level = atoi(optarg);
- break;
-@@ -2318,6 +2323,13 @@ main(int argc, char **argv)
- if (!t)
- goto free_info;
-
-+ if (do_info) {
-+ rc = print_session(db, 3, info);
-+ if (rc)
-+ rc = -1;
-+ goto free_info;
-+ }
-+
- if (!do_logout && !do_rescan && !do_stats && op < 0 &&
- info_level > 0) {
- rc = print_session(db, info_level, info);
-@@ -2351,6 +2363,11 @@ free_info:
- goto out;
- }
-
-+ if (do_info) {
-+ rc = print_sessions(db, 3);
-+ goto out;
-+ }
-+
- rc = print_sessions(db, info_level);
- }
- break;
|
[-]
[+]
|
Deleted |
iscsi-initiator-utils-build-fw-as-lib.patch
^
|
@@ -1,67 +0,0 @@
-diff -aurp open-iscsi-2.0-868-test1/usr/Makefile open-iscsi-2.0-868-test1.work/usr/Makefile
---- open-iscsi-2.0-868-test1/usr/Makefile 2008-08-26 03:40:34.000000000 -0500
-+++ open-iscsi-2.0-868-test1.work/usr/Makefile 2008-08-26 04:12:21.000000000 -0500
-@@ -40,24 +40,24 @@ COMMON_SRCS = $(ISCSI_LIB_SRCS)
- # core initiator files
- INITIATOR_SRCS = initiator.o scsi.o actor.o mgmt_ipc.o isns.o transport.o
- # fw boot files
--FW_BOOT_SRCS = $(wildcard ../utils/fwparam_ibft/*.o)
-+FW_BOOT_LIB_PATH = $(wildcard ../utils/fwparam_ibft/)
-
- all: $(PROGRAMS)
-
- iscsid: $(COMMON_SRCS) $(IPC_OBJ) $(INITIATOR_SRCS) iscsid.o
- $(CC) $(CFLAGS) $^ -o $@
-
--iscsiadm: $(COMMON_SRCS) $(FW_BOOT_SRCS) strings.o discovery.o iscsiadm.o
-- $(CC) $(CFLAGS) $^ -o $@
-+iscsiadm: $(COMMON_SRCS) strings.o discovery.o iscsiadm.o
-+ $(CC) $(CFLAGS) -L$(FW_BOOT_LIB_PATH) $^ -o $@ -lfwparam
-
--iscsistart: $(IPC_OBJ) $(ISCSI_LIB_SRCS) $(INITIATOR_SRCS) $(FW_BOOT_SRCS) \
-+iscsistart: $(IPC_OBJ) $(ISCSI_LIB_SRCS) $(INITIATOR_SRCS) \
- iscsistart.o statics.o
-- $(CC) $(CFLAGS) -static $^ -o $@
-+ $(CC) $(CFLAGS) -static -L$(FW_BOOT_LIB_PATH) $^ -o $@ -lfwparam
-
- clean:
- rm -f *.o $(PROGRAMS) .depend
-
- depend:
-- gcc $(CFLAGS) -M `ls *.c` > .depend
-+ gcc $(CFLAGS) -L$(FW_BOOT_LIB_PATH) -lfwparam -M `ls *.c` > .depend
-
- -include .depend
-diff -aurp open-iscsi-2.0-868-test1/utils/fwparam_ibft/Makefile open-iscsi-2.0-868-test1.work/utils/fwparam_ibft/Makefile
---- open-iscsi-2.0-868-test1/utils/fwparam_ibft/Makefile 2008-08-26 03:40:34.000000000 -0500
-+++ open-iscsi-2.0-868-test1.work/utils/fwparam_ibft/Makefile 2008-08-26 04:13:33.000000000 -0500
-@@ -24,7 +24,8 @@
- OBJS := fwparam_ibft.o fw_entry.o fwparam_ibft_sysfs.o
- OBJS += prom_lex.o prom_parse.tab.o fwparam_ppc.o
- GENFILES := prom_lex.c prom_parse.tab.c prom_parse.tab.h
--CLEANFILES = $(OBJS) $(GENFILES) *.output *~
-+LIB=libfwparam.a
-+CLEANFILES = $(OBJS) $(LIB) *.output *~
- BISONFLAGS = -d
- FLEXFLAGS = -t
- # turn off #line number markers
-@@ -38,7 +39,7 @@ OPTFLAGS ?= -O2 -g -fPIC
- WARNFLAGS ?= -Wall -Wstrict-prototypes
- CFLAGS += $(OPTFLAGS) $(WARNFLAGS) -I../../include
-
--all: $(OBJS)
-+all: $(LIB)
-
- clean:
- rm -f *.o $(CLEANFILES) .depend
-@@ -54,6 +55,9 @@ $(GENFILES): Makefile
- $(OBJS): prom_parse.tab.h prom_parse.h fwparam_ibft.h
-
- depend:
-- gcc $(CFLAGS) -M `ls *.c` > .depend
-+ gcc $(CFLAGS) -static -M `ls *.c` > .depend
-+
-+$(LIB): $(OBJS)
-+ ar -rcs $(LIB) $(OBJS)
-
- -include .depend
|
[-]
[+]
|
Deleted |
iscsi-initiator-utils-fix-libfwparam-anaconda-use.patch
^
|
@@ -1,332 +0,0 @@
-diff -Naurp open-iscsi-2.0-868-test1/include/fw_context.h open-iscsi-2.0-868-test1.work/include/fw_context.h
---- open-iscsi-2.0-868-test1/include/fw_context.h 2008-12-16 11:10:54.000000000 -0600
-+++ open-iscsi-2.0-868-test1.work/include/fw_context.h 2008-12-17 02:43:41.000000000 -0600
-@@ -21,7 +21,7 @@
- #ifndef FWPARAM_CONTEXT_H_
- #define FWPARAM_CONTEXT_H_
-
--#include "list.h"
-+#include "iscsi_list.h"
-
- struct boot_context {
- struct list_head list;
-@@ -58,5 +58,6 @@ extern int fw_get_entry(struct boot_cont
- extern void fw_print_entry(struct boot_context *context);
- extern int fw_get_targets(struct list_head *list);
- extern void fw_free_targets(struct list_head *list);
-+extern int fwparam_ibft_sysfs(struct boot_context *context, const char *filepath);
-
- #endif /* FWPARAM_CONTEXT_H_ */
-diff -Naurp open-iscsi-2.0-868-test1/include/list.h open-iscsi-2.0-868-test1.work/include/list.h
---- open-iscsi-2.0-868-test1/include/list.h 2008-12-16 11:10:54.000000000 -0600
-+++ open-iscsi-2.0-868-test1.work/include/list.h 1969-12-31 18:00:00.000000000 -0600
-@@ -1,93 +0,0 @@
--#ifndef __LIST_H__
--#define __LIST_H__
--
--#include <stddef.h>
--/* taken from linux kernel */
--
--#undef offsetof
--#ifdef __compiler_offsetof
--#define offsetof(TYPE,MEMBER) __compiler_offsetof(TYPE,MEMBER)
--#else
--#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
--#endif
--
--#define container_of(ptr, type, member) ({ \
-- const typeof( ((type *)0)->member ) *__mptr = (ptr); \
-- (type *)( (char *)__mptr - offsetof(type,member) );})
--
--struct list_head {
-- struct list_head *next, *prev;
--};
--
--#define LIST_HEAD_INIT(name) { &(name), &(name) }
--
--#define LIST_HEAD(name) \
-- struct list_head name = LIST_HEAD_INIT(name)
--
--static inline void INIT_LIST_HEAD(struct list_head *list)
--{
-- list->next = list;
-- list->prev = list;
--}
--
--static inline int list_empty(const struct list_head *head)
--{
-- return head->next == head;
--}
--
--#define list_entry(ptr, type, member) \
-- container_of(ptr, type, member)
--
--#define list_for_each(pos, head) \
-- for (pos = (head)->next; pos != (head); pos = pos->next)
--
--#define list_for_each_entry(pos, head, member) \
-- for (pos = list_entry((head)->next, typeof(*pos), member); \
-- &pos->member != (head); \
-- pos = list_entry(pos->member.next, typeof(*pos), member))
--
--#define list_for_each_entry_safe(pos, n, head, member) \
-- for (pos = list_entry((head)->next, typeof(*pos), member), \
-- n = list_entry(pos->member.next, typeof(*pos), member); \
-- &pos->member != (head); \
-- pos = n, n = list_entry(n->member.next, typeof(*n), member))
--
--static inline void __list_add(struct list_head *new,
-- struct list_head *prev,
-- struct list_head *next)
--{
-- next->prev = new;
-- new->next = next;
-- new->prev = prev;
-- prev->next = new;
--}
--
--static inline void list_add(struct list_head *new, struct list_head *head)
--{
-- __list_add(new, head, head->next);
--}
--
--static inline void list_add_tail(struct list_head *new, struct list_head *head)
--{
-- __list_add(new, head->prev, head);
--}
--
--static inline void __list_del(struct list_head * prev, struct list_head * next)
--{
-- next->prev = prev;
-- prev->next = next;
--}
--
--static inline void list_del(struct list_head *entry)
--{
-- __list_del(entry->prev, entry->next);
-- entry->next = entry->prev = NULL;
--}
--
--static inline void list_del_init(struct list_head *entry)
--{
-- __list_del(entry->prev, entry->next);
-- INIT_LIST_HEAD(entry);
--}
--
--#endif
-diff -Naurp open-iscsi-2.0-868-test1/usr/actor.c open-iscsi-2.0-868-test1.work/usr/actor.c
---- open-iscsi-2.0-868-test1/usr/actor.c 2008-12-16 11:10:54.000000000 -0600
-+++ open-iscsi-2.0-868-test1.work/usr/actor.c 2008-12-16 11:11:51.000000000 -0600
-@@ -19,7 +19,6 @@
- #include <inttypes.h>
- #include "actor.h"
- #include "log.h"
--#include "list.h"
-
- static LIST_HEAD(pend_list);
- static LIST_HEAD(poll_list);
-diff -Naurp open-iscsi-2.0-868-test1/usr/actor.h open-iscsi-2.0-868-test1.work/usr/actor.h
---- open-iscsi-2.0-868-test1/usr/actor.h 2008-12-16 11:10:54.000000000 -0600
-+++ open-iscsi-2.0-868-test1.work/usr/actor.h 2008-12-16 11:11:02.000000000 -0600
-@@ -20,7 +20,7 @@
- #define ACTOR_H
-
- #include "types.h"
--#include "list.h"
-+#include "iscsi_list.h"
-
- #define ACTOR_RESOLUTION 250 /* in millis */
- #define ACTOR_MAX_LOOPS 1
-diff -Naurp open-iscsi-2.0-868-test1/usr/config.h open-iscsi-2.0-868-test1.work/usr/config.h
---- open-iscsi-2.0-868-test1/usr/config.h 2008-12-16 11:10:54.000000000 -0600
-+++ open-iscsi-2.0-868-test1.work/usr/config.h 2008-12-16 11:11:02.000000000 -0600
-@@ -24,7 +24,7 @@
- #include <net/if.h>
- #include "types.h"
- #include "auth.h" /* for the username and password sizes */
--#include "list.h"
-+#include "iscsi_list.h"
-
- /* ISIDs now have a typed naming authority in them. We use an OUI */
- #define DRIVER_ISID_0 0x00
-diff -Naurp open-iscsi-2.0-868-test1/usr/initiator.h open-iscsi-2.0-868-test1.work/usr/initiator.h
---- open-iscsi-2.0-868-test1/usr/initiator.h 2008-12-16 11:10:54.000000000 -0600
-+++ open-iscsi-2.0-868-test1.work/usr/initiator.h 2008-12-16 11:11:02.000000000 -0600
-@@ -30,7 +30,7 @@
- #include "mgmt_ipc.h"
- #include "config.h"
- #include "actor.h"
--#include "list.h"
-+#include "iscsi_list.h"
-
- #define ISCSI_CONFIG_ROOT "/etc/iscsi/"
-
-diff -Naurp open-iscsi-2.0-868-test1/usr/iscsiadm.c open-iscsi-2.0-868-test1.work/usr/iscsiadm.c
---- open-iscsi-2.0-868-test1/usr/iscsiadm.c 2008-12-16 11:10:54.000000000 -0600
-+++ open-iscsi-2.0-868-test1.work/usr/iscsiadm.c 2008-12-16 11:11:02.000000000 -0600
-@@ -37,7 +37,7 @@
- #include "transport.h"
- #include "version.h"
- #include "iscsi_sysfs.h"
--#include "list.h"
-+#include "iscsi_list.h"
- #include "iscsi_settings.h"
- #include "fw_context.h"
-
-diff -Naurp open-iscsi-2.0-868-test1/usr/iscsi_list.h open-iscsi-2.0-868-test1.work/usr/iscsi_list.h
---- open-iscsi-2.0-868-test1/usr/iscsi_list.h 1969-12-31 18:00:00.000000000 -0600
-+++ open-iscsi-2.0-868-test1.work/usr/iscsi_list.h 2008-12-16 11:11:02.000000000 -0600
-@@ -0,0 +1,93 @@
-+#ifndef __LIST_H__
-+#define __LIST_H__
-+
-+#include <stddef.h>
-+/* taken from linux kernel */
-+
-+#undef offsetof
-+#ifdef __compiler_offsetof
-+#define offsetof(TYPE,MEMBER) __compiler_offsetof(TYPE,MEMBER)
-+#else
-+#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
-+#endif
-+
-+#define container_of(ptr, type, member) ({ \
-+ const typeof( ((type *)0)->member ) *__mptr = (ptr); \
-+ (type *)( (char *)__mptr - offsetof(type,member) );})
-+
-+struct list_head {
-+ struct list_head *next, *prev;
-+};
|
[-]
[+]
|
Deleted |
iscsi-initiator-utils-fix-login-err.patch
^
|
@@ -1,112 +0,0 @@
-diff -aurp open-iscsi-2.0-868-test1.work.base/usr/initiator.c open-iscsi-2.0-868-test1.work/usr/initiator.c
---- open-iscsi-2.0-868-test1.work.base/usr/initiator.c 2008-12-02 15:07:28.000000000 -0600
-+++ open-iscsi-2.0-868-test1.work/usr/initiator.c 2008-12-02 15:07:45.000000000 -0600
-@@ -922,7 +922,7 @@ __conn_error_handle(iscsi_session_t *ses
- qtask = session->sync_qtask;
- else
- qtask = &session->reopen_qtask;
-- iscsi_login_eh(conn, qtask, STOP_CONN_RECOVER);
-+ iscsi_login_eh(conn, qtask, MGMT_IPC_ERR_TRANS_FAILURE);
- return;
- }
- log_debug(1, "ignoring conn error in login. "
-@@ -1491,12 +1491,13 @@ static void iscsi_recv_nop_in(iscsi_conn
- static void iscsi_recv_logout_rsp(iscsi_conn_t *conn, struct iscsi_hdr *hdr)
- {
- struct iscsi_logout_rsp *logout_rsp = (struct iscsi_logout_rsp *)hdr;
-- log_debug(3, "Recv: logout response\n");
-
--
-- conn->session->def_time2wait = ntohl(logout_rsp->t2wait);
-- log_debug(4, "logout rsp returned time2wait %u",
-- conn->session->def_time2wait);
-+ log_debug(3, "Recv: logout response %d\n", logout_rsp->response);
-+ if (logout_rsp->response == 2 || logout_rsp->response == 3) {
-+ conn->session->def_time2wait = ntohs(logout_rsp->t2wait);
-+ log_debug(4, "logout rsp returned time2wait %u",
-+ conn->session->def_time2wait);
-+ }
- /* TODO process the hdr */
- __conn_error_handle(conn->session, conn);
- }
-@@ -1607,9 +1608,11 @@ static void iscsi_recv_login_rsp(struct
-
- return;
- retry:
-- /* force retry */
-- session->r_stage = R_STAGE_SESSION_REOPEN;
-+ iscsi_login_eh(conn, c->qtask, MGMT_IPC_ERR_LOGIN_FAILURE);
-+ return;
- failed:
-+ /* force faulure */
-+ session->reopen_cnt = session->nrec.session.initial_login_retry_max;
- iscsi_login_eh(conn, c->qtask, MGMT_IPC_ERR_LOGIN_FAILURE);
- return;
- }
-@@ -1879,45 +1882,49 @@ session_login_task(node_rec_t *rec, queu
- rec->session.iscsi.ERL != 0) ||
- (!(t->caps & CAP_RECOVERY_L1) &&
- rec->session.iscsi.ERL > 1)) {
-- log_error("transport '%s' does not support ERL %d",
-+ log_error("Transport '%s' does not support ERL %d."
-+ "Setting ERL to ERL0.\n",
- t->name, rec->session.iscsi.ERL);
-- return MGMT_IPC_ERR_TRANS_CAPS;
-+ rec->session.iscsi.ERL = 0;
- }
-
- if (!(t->caps & CAP_MULTI_R2T) &&
- rec->session.iscsi.MaxOutstandingR2T) {
-- log_error("transport '%s' does not support "
-- "MaxOutstandingR2T %d", t->name,
-+ log_error("Transport '%s' does not support "
-+ "MaxOutstandingR2T %d. Setting "
-+ "MaxOutstandingR2T to 1.", t->name,
- rec->session.iscsi.MaxOutstandingR2T);
-- return MGMT_IPC_ERR_TRANS_CAPS;
-+ rec->session.iscsi.MaxOutstandingR2T = 1;
- }
-
- if (!(t->caps & CAP_HDRDGST) &&
- rec->conn[0].iscsi.HeaderDigest) {
-- log_error("transport '%s' does not support "
-- "HeaderDigest != None", t->name);
-- return MGMT_IPC_ERR_TRANS_CAPS;
-+ log_error("Transport '%s' does not support "
-+ "HeaderDigest != None. Setting HeaderDigest "
-+ "to None.", t->name);
-+ rec->conn[0].iscsi.HeaderDigest = CONFIG_DIGEST_NEVER;
- }
-
- if (!(t->caps & CAP_DATADGST) &&
- rec->conn[0].iscsi.DataDigest) {
-- log_error("transport '%s' does not support "
-- "DataDigest != None", t->name);
-- return MGMT_IPC_ERR_TRANS_CAPS;
-+ log_error("Transport '%s' does not support "
-+ "DataDigest != None. Setting DataDigest "
-+ "to None", t->name);
-+ rec->conn[0].iscsi.DataDigest = CONFIG_DIGEST_NEVER;
- }
-
- if (!(t->caps & CAP_MARKERS) &&
- rec->conn[0].iscsi.IFMarker) {
-- log_error("transport '%s' does not support IFMarker",
-- t->name);
-- return MGMT_IPC_ERR_TRANS_CAPS;
-+ log_error("Transport '%s' does not support IFMarker. "
-+ "Disabling IFMarkers.\n", t->name);
-+ rec->conn[0].iscsi.IFMarker = 0;
- }
-
- if (!(t->caps & CAP_MARKERS) &&
- rec->conn[0].iscsi.OFMarker) {
-- log_error("transport '%s' does not support OFMarker",
-- t->name);
-- return MGMT_IPC_ERR_TRANS_CAPS;
-+ log_error("Transport '%s' does not support OFMarker.",
-+ "Disabling OFMarkers.\n", t->name);
-+ rec->conn[0].iscsi.OFMarker = 0;
- }
-
- session = __session_create(rec, t);
|
[-]
[+]
|
Deleted |
iscsi-initiator-utils-fix-segment-len-check.patch
^
|
@@ -1,12 +0,0 @@
-diff -aurp open-iscsi-2.0-868-test1/usr/io.c open-iscsi-2.0-868-test1.work/usr/io.c
---- open-iscsi-2.0-868-test1/usr/io.c 2008-03-18 17:41:06.000000000 -0500
-+++ open-iscsi-2.0-868-test1.work/usr/io.c 2008-03-18 17:41:36.000000000 -0500
-@@ -794,7 +794,7 @@ iscsi_io_recv_pdu(iscsi_conn_t *conn, st
- if (dlength == 0)
- goto done;
-
-- if (data + dlength >= end) {
-+ if (data + dlength > end) {
- log_warning("buffer size %u too small for data length %u",
- max_data_length, dlength);
- failed = 1;
|
[-]
[+]
|
Deleted |
iscsi-initiator-utils-fix-sync-up.patch
^
|
@@ -1,40 +0,0 @@
-diff -aurp open-iscsi-2.0-868-test1/usr/iscsid.c open-iscsi-2.0-868-test1.work/usr/iscsid.c
---- open-iscsi-2.0-868-test1/usr/iscsid.c 2008-03-11 17:25:29.000000000 -0500
-+++ open-iscsi-2.0-868-test1.work/usr/iscsid.c 2008-03-11 17:25:50.000000000 -0500
-@@ -177,7 +177,7 @@ setup_rec_from_negotiated_values(idbm_t
- static int sync_session(void *data, struct session_info *info)
- {
- idbm_t *db = data;
-- node_rec_t rec;
-+ node_rec_t rec, sysfsrec;
- iscsiadm_req_t req;
- iscsiadm_rsp_t rsp;
- struct iscsi_transport *t;
-@@ -219,6 +219,27 @@ static int sync_session(void *data, stru
- log_warning("Could not read data from db. Using default and "
- "currently negotiated values\n");
- setup_rec_from_negotiated_values(db, &rec, info);
-+ } else {
-+ /*
-+ * we have a valid record and iface so lets merge
-+ * the values from them and sysfs to try and get
-+ * the most uptodate values.
-+ *
-+ * Currenlty that means we will use the CHAP, target and
-+ * and portal values from sysfs and use timer, queue depth,
-+ * and segment length values from the record. In the future
-+ * when boot supports iface binding we will want to use
-+ * those values from sysfs.
-+ */
-+ memset(&sysfsrec, 0, sizeof(node_rec_t));
-+ setup_rec_from_negotiated_values(db, &sysfsrec, info);
-+ /*
-+ * target and portal values have to be the same or
-+ * we would not have found the record, so just copy
-+ * CHAP.
-+ */
-+ memcpy(&rec.session.auth, &sysfsrec.session.auth,
-+ sizeof(struct iscsi_auth_config));
- }
-
- /* multiple drivers could be connected to the same portal */
|
[-]
[+]
|
Deleted |
iscsi-initiator-utils-handle-ipv6-compat-addrs.patch
^
|
@@ -1,15 +0,0 @@
-diff -aurp open-iscsi-2.0-868-test1/usr/isns.c open-iscsi-2.0-868-test1.work/usr/isns.c
---- open-iscsi-2.0-868-test1/usr/isns.c 2008-03-03 09:36:11.000000000 -0600
-+++ open-iscsi-2.0-868-test1.work/usr/isns.c 2008-03-03 09:38:03.000000000 -0600
-@@ -286,7 +286,10 @@ static void add_new_target_node(char *ta
- char dst[INET6_ADDRSTRLEN];
-
- memset(dst, 0, sizeof(dst));
-- if (!memcmp(ip, dst, 10) && ip[10] == 0xff && ip[11] == 0xff)
-+ /*
-+ * some servers are sending compat instead of mapped
-+ */
-+ if (IN6_IS_ADDR_V4MAPPED(ip) || IN6_IS_ADDR_V4COMPAT(ip))
- inet_ntop(AF_INET, ip + 12, dst, sizeof(dst));
- else
- inet_ntop(AF_INET6, ip, dst, sizeof(dst));
|
[-]
[+]
|
Deleted |
iscsi-initiator-utils-ibft-sysfs.patch
^
|
@@ -1,316 +0,0 @@
-diff -Naurp open-iscsi-2.0-868-test1/utils/fwparam_ibft/fw_entry.c open-iscsi-2.0-868-test1.curr/utils/fwparam_ibft/fw_entry.c
---- open-iscsi-2.0-868-test1/utils/fwparam_ibft/fw_entry.c 2008-01-03 13:23:36.000000000 -0600
-+++ open-iscsi-2.0-868-test1.curr/utils/fwparam_ibft/fw_entry.c 2008-01-23 12:07:52.000000000 -0600
-@@ -29,7 +29,8 @@ int fw_get_entry(struct boot_context *co
-
- ret = fwparam_ppc(context, filepath);
- if (ret)
-- ret = fwparam_ibft(context, filepath);
-+ ret = fwparam_ibft_sysfs(context, filepath);
-+
- return ret;
- }
-
-diff -Naurp open-iscsi-2.0-868-test1/utils/fwparam_ibft/fwparam_ibft.h open-iscsi-2.0-868-test1.curr/utils/fwparam_ibft/fwparam_ibft.h
---- open-iscsi-2.0-868-test1/utils/fwparam_ibft/fwparam_ibft.h 2008-01-03 13:23:36.000000000 -0600
-+++ open-iscsi-2.0-868-test1.curr/utils/fwparam_ibft/fwparam_ibft.h 2008-01-23 12:07:52.000000000 -0600
-@@ -153,6 +153,7 @@ extern int dev_count;
- #define TARGET "target"
-
- extern int fwparam_ibft(struct boot_context *context, const char *filepath);
-+extern int fwparam_ibft_sysfs(struct boot_context *context,
-+ const char *filepath);
- extern int fwparam_ppc(struct boot_context *context, const char *filepath);
--
- #endif /* FWPARAM_IBFT_H_ */
-diff -Naurp open-iscsi-2.0-868-test1/utils/fwparam_ibft/fwparam_ibft_sysfs.c open-iscsi-2.0-868-test1.curr/utils/fwparam_ibft/fwparam_ibft_sysfs.c
---- open-iscsi-2.0-868-test1/utils/fwparam_ibft/fwparam_ibft_sysfs.c 1969-12-31 18:00:00.000000000 -0600
-+++ open-iscsi-2.0-868-test1.curr/utils/fwparam_ibft/fwparam_ibft_sysfs.c 2008-01-23 12:08:04.000000000 -0600
-@@ -0,0 +1,271 @@
-+/*
-+ * Copyright (C) IBM Corporation. 2007
-+ * Author: Konrad Rzeszutek <konradr@linux.vnet.ibm.com>
-+ *
-+ * This program is free software: you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License as published by
-+ * the Free Software Foundation, either version 2 of the License, or
-+ * (at your option) any later version.
-+ *
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ * GNU General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU General Public License
-+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
-+ */
-+
-+#define _XOPEN_SOURCE 500
-+#include <ftw.h>
-+#include <stdio.h>
-+#include <stdlib.h>
-+#include <string.h>
-+#include <unistd.h>
-+#include <fcntl.h>
-+#include <errno.h>
-+#include "fwparam_ibft.h"
-+#include <fw_context.h>
-+
-+#define IBFT_MAX 255
-+#define IBFT_SYSFS_ROOT "/sys/firmware/ibft/"
-+
-+static char *target_list[IBFT_MAX];
-+static char *nic_list[IBFT_MAX];
-+static int nic_cnt;
-+static int tgt_cnt;
-+
-+/*
-+ * Helper routines.
-+ */
-+static int file_exist(const char *file)
-+{
-+
-+ struct stat bootpath_stat;
-+
-+ return !stat(file, &bootpath_stat);
-+}
-+
-+static int read_file(const char *file, char **contents)
-+{
-+ int error, fd, bytes_read;
-+ struct stat bootpath_stat;
-+
-+ error = stat(file, &bootpath_stat);
-+ if (error < 0) {
-+ fprintf(stderr, "(%s:%d) stat %s, %s\n", __FILE__, __LINE__,
-+ file, strerror(errno));
-+ return error;
-+ }
-+
-+ *contents = malloc(bootpath_stat.st_size);
-+ if (!*contents) {
-+ error = ENOMEM;
-+ fprintf(stderr, "(%s:%d) Could not allocate enough memory for "\
-+ "%s: %s (%d)\n",
-+ __FILE__, __LINE__, file, strerror(error), error);
-+ return errno;
-+ }
-+
-+ fd = open(file, O_RDONLY);
-+ if (fd < 0) {
-+ fprintf(stderr, "(%s:%d): Could not open %s: %s (%d)\n",
-+ __FILE__, __LINE__, file, strerror(errno), errno);
-+ free(*contents);
-+ return errno;
-+ }
-+
-+ bytes_read = read(fd, *contents, bootpath_stat.st_size);
-+ close(fd);
-+ if (bytes_read > bootpath_stat.st_size) {
-+ fprintf(stderr, "(%s:%d) Read more data in than expected for "\
-+ "%s: %s (%d)\n",
-+ __FILE__, __LINE__, file, strerror(EIO), EIO);
-+ free(*contents);
-+ return errno;
-+ }
-+ /* chop() implementation */
-+ if (*(*contents + (ssize_t)(bytes_read - 1)) == '\n')
-+ *(*contents + (ssize_t) (bytes_read - 1)) = 0;
-+
-+ return 0;
-+}
-+
-+static int read_data(const char *dir, const char *name, char *dst, ssize_t size)
-+{
-+ char *data = NULL;
-+ char file[FILENAMESZ];
-+ int rc = 0;
-+
-+ memset(file, 0, FILENAMESZ);
-+ strncat(file, dir, FILENAMESZ);
-+ strncat(file, name, FILENAMESZ);
-+
-+ if (file_exist(file)) {
-+ rc = read_file(file, &data);
-+ if (debug)
-+ fprintf(stderr, "(%s:%d) Read from %s:[%s]\n",
-+ __FILE__, __LINE__, file, data);
-+ if (!rc)
-+ memcpy(dst, data, size);
-+ free(data);
-+ }
-+
-+ return rc;
-+}
-+
-+static int read_int_data(const char *dir, const char *name, int *dst)
-+{
-+ int rc = 0;
-+ char contents[5]; /* The flag is a 1 byte value */
-+
-+ rc = read_data(dir, name, (char *)&contents, sizeof(contents));
-+ if (!rc)
-+ *dst = atoi(contents);
-+
-+ return rc;
-+}
-+
-+/*
-+ * Finds the etherrnetX and targetX under the sysfs directory.
-+ */
-+static int find_sysfs_dirs(const char *fpath, const struct stat *sb,
-+ int tflag, struct FTW *ftw)
-+{
-+ if (tflag == FTW_D &&
-+ (strstr(fpath + ftw->base, "target")))
-+ target_list[tgt_cnt++] = strdup(fpath);
-+
-+ if (tflag == FTW_D &&
-+ (strstr(fpath + ftw->base, "ethernet")))
-+ nic_list[nic_cnt++] = strdup(fpath);
-+
-+ return 0;
-+}
-+
-+/*
-+ * Routines to fill in the context values.
-+ */
-+static int fill_nic_context(const char *dir, struct boot_context *context)
-+{
-+ int rc = 0;
-+
-+ rc |= read_data(dir, "/mac", context->mac, sizeof(context->mac));
-+ rc |= read_data(dir, "/vlan", context->vlan, sizeof(context->vlan));
-+ rc |= read_data(dir, "/ip-addr", context->ipaddr,
-+ sizeof(context->ipaddr));
-+ rc |= read_data(dir, "/mask", context->mask, sizeof(context->mask));
-+
-+ return rc;
-+}
-+
-+static int fill_initiator_context(const char *dir, struct boot_context *context)
-+{
-+ int rc = 0;
-+
-+ rc |= read_data(dir, "/initiator-name", context->initiatorname,
-+ sizeof(context->initiatorname));
-+ rc |= read_data(dir, "/isns-server", context->isid,
-+ sizeof(context->isid));
-+
|
[-]
[+]
|
Deleted |
iscsi-initiator-utils-increase-login-retry-for-boot.patch
^
|
@@ -1,23 +0,0 @@
-diff -aurp open-iscsi-2.0-868-test1/usr/iscsistart.c open-iscsi-2.0-868-test1.work/usr/iscsistart.c
---- open-iscsi-2.0-868-test1/usr/iscsistart.c 2008-04-28 15:15:03.000000000 -0500
-+++ open-iscsi-2.0-868-test1.work/usr/iscsistart.c 2008-04-29 10:33:11.000000000 -0500
-@@ -126,10 +126,19 @@ static int setup_session(void)
- iscsiadm_rsp_t rsp;
- int rc;
-
-+ /*
-+ * For root boot we cannot change this so increase to account
-+ * for boot using static setup.
-+ */
-+ config_rec.session.initial_login_retry_max = 120;
- /* we cannot answer so turn off */
- config_rec.conn[0].timeo.noop_out_interval = 0;
- config_rec.conn[0].timeo.noop_out_timeout = 0;
-
-+ printf("%s: Logging into %s %s:%d,%d\n", program_name, config_rec.name,
-+ config_rec.conn[0].address, config_rec.conn[0].port,
-+ config_rec.tpgt);
-+
- memset(&req, 0, sizeof(req));
- req.command = MGMT_IPC_SESSION_LOGIN;
- memcpy(&req.u.session.rec, &config_rec, sizeof(node_rec_t));
|
[-]
[+]
|
Deleted |
iscsi-initiator-utils-login-all-fw-tgts-and-create-rec.patch
^
|
@@ -1,892 +0,0 @@
-diff -Naurp open-iscsi-2.0-868-test1.work3/include/fw_context.h open-iscsi-2.0-868-test1.work2/include/fw_context.h
---- open-iscsi-2.0-868-test1.work3/include/fw_context.h 2008-11-30 20:44:12.000000000 -0600
-+++ open-iscsi-2.0-868-test1.work2/include/fw_context.h 2008-11-30 20:43:24.000000000 -0600
-@@ -21,7 +21,11 @@
- #ifndef FWPARAM_CONTEXT_H_
- #define FWPARAM_CONTEXT_H_
-
-+#include "list.h"
-+
- struct boot_context {
-+ struct list_head list;
-+
- #define IQNSZ (223+1)
- #define CHAPSZ (255+1)
- /* target settings */
-@@ -52,5 +56,7 @@ struct boot_context {
-
- extern int fw_get_entry(struct boot_context *context, const char *filepath);
- extern void fw_print_entry(struct boot_context *context);
-+extern int fw_get_targets(struct list_head *list);
-+extern void fw_free_targets(struct list_head *list);
-
- #endif /* FWPARAM_CONTEXT_H_ */
-diff -Naurp open-iscsi-2.0-868-test1.work3/include/list.h open-iscsi-2.0-868-test1.work2/include/list.h
---- open-iscsi-2.0-868-test1.work3/include/list.h 1969-12-31 18:00:00.000000000 -0600
-+++ open-iscsi-2.0-868-test1.work2/include/list.h 2008-11-30 20:43:24.000000000 -0600
-@@ -0,0 +1,93 @@
-+#ifndef __LIST_H__
-+#define __LIST_H__
-+
-+#include <stddef.h>
-+/* taken from linux kernel */
-+
-+#undef offsetof
-+#ifdef __compiler_offsetof
-+#define offsetof(TYPE,MEMBER) __compiler_offsetof(TYPE,MEMBER)
-+#else
-+#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
-+#endif
-+
-+#define container_of(ptr, type, member) ({ \
-+ const typeof( ((type *)0)->member ) *__mptr = (ptr); \
-+ (type *)( (char *)__mptr - offsetof(type,member) );})
-+
-+struct list_head {
-+ struct list_head *next, *prev;
-+};
-+
-+#define LIST_HEAD_INIT(name) { &(name), &(name) }
-+
-+#define LIST_HEAD(name) \
-+ struct list_head name = LIST_HEAD_INIT(name)
-+
-+static inline void INIT_LIST_HEAD(struct list_head *list)
-+{
-+ list->next = list;
-+ list->prev = list;
-+}
-+
-+static inline int list_empty(const struct list_head *head)
-+{
-+ return head->next == head;
-+}
-+
-+#define list_entry(ptr, type, member) \
-+ container_of(ptr, type, member)
-+
-+#define list_for_each(pos, head) \
-+ for (pos = (head)->next; pos != (head); pos = pos->next)
-+
-+#define list_for_each_entry(pos, head, member) \
-+ for (pos = list_entry((head)->next, typeof(*pos), member); \
-+ &pos->member != (head); \
-+ pos = list_entry(pos->member.next, typeof(*pos), member))
-+
-+#define list_for_each_entry_safe(pos, n, head, member) \
-+ for (pos = list_entry((head)->next, typeof(*pos), member), \
-+ n = list_entry(pos->member.next, typeof(*pos), member); \
-+ &pos->member != (head); \
-+ pos = n, n = list_entry(n->member.next, typeof(*n), member))
-+
-+static inline void __list_add(struct list_head *new,
-+ struct list_head *prev,
-+ struct list_head *next)
-+{
-+ next->prev = new;
-+ new->next = next;
-+ new->prev = prev;
-+ prev->next = new;
-+}
-+
-+static inline void list_add(struct list_head *new, struct list_head *head)
-+{
-+ __list_add(new, head, head->next);
-+}
-+
-+static inline void list_add_tail(struct list_head *new, struct list_head *head)
-+{
-+ __list_add(new, head->prev, head);
-+}
-+
-+static inline void __list_del(struct list_head * prev, struct list_head * next)
-+{
-+ next->prev = prev;
-+ prev->next = next;
-+}
-+
-+static inline void list_del(struct list_head *entry)
-+{
-+ __list_del(entry->prev, entry->next);
-+ entry->next = entry->prev = NULL;
-+}
-+
-+static inline void list_del_init(struct list_head *entry)
-+{
-+ __list_del(entry->prev, entry->next);
-+ INIT_LIST_HEAD(entry);
-+}
-+
-+#endif
-diff -Naurp open-iscsi-2.0-868-test1.work3/usr/idbm.c open-iscsi-2.0-868-test1.work2/usr/idbm.c
---- open-iscsi-2.0-868-test1.work3/usr/idbm.c 2008-11-30 20:44:12.000000000 -0600
-+++ open-iscsi-2.0-868-test1.work2/usr/idbm.c 2008-11-30 20:46:57.000000000 -0600
-@@ -35,6 +35,7 @@
- #include "iscsi_settings.h"
- #include "transport.h"
- #include "iscsi_sysfs.h"
-+#include "version.h"
-
- #define IDBM_HIDE 0 /* Hide parameter when print. */
- #define IDBM_SHOW 1 /* Show parameter when print. */
-@@ -434,6 +435,7 @@ idbm_print(int type, void *rec, int show
- break;
- }
-
-+ fprintf(f, "# BEGIN RECORD %s\n", ISCSI_VERSION_STR);
- for (i = 0; i < MAX_KEYS; i++) {
- if (!info[i].visible)
- continue;
-@@ -450,6 +452,7 @@ idbm_print(int type, void *rec, int show
- else if (f == stdout)
- fprintf(f, "%s = <empty>\n", info[i].name);
- }
-+ fprintf(f, "# END RECORD\n");
-
- free(info);
- }
-diff -Naurp open-iscsi-2.0-868-test1.work3/usr/iscsiadm.c open-iscsi-2.0-868-test1.work2/usr/iscsiadm.c
---- open-iscsi-2.0-868-test1.work3/usr/iscsiadm.c 2008-11-30 20:44:12.000000000 -0600
-+++ open-iscsi-2.0-868-test1.work2/usr/iscsiadm.c 2008-11-30 20:43:24.000000000 -0600
-@@ -1878,32 +1878,48 @@ fw_create_rec_by_entry(idbm_t *db, struc
- static int exec_fw_op(idbm_t *db, discovery_rec_t *drec, int do_login,
- int info_level)
- {
-- struct boot_context context;
-+ struct boot_context *context;
- struct node_rec *rec;
-+ struct list_head targets;
- int ret = 0;
-
-- memset(&context, 0, sizeof(struct boot_context));
-- ret = fw_get_entry(&context, NULL);
-+ INIT_LIST_HEAD(&targets);
-+
-+ ret = fw_get_targets(&targets);
- if (ret) {
-- log_error("Could not read fw values.");
-+ log_error("Could not get list of targets from firmware.\n");
- return ret;
- }
-
-- rec = fw_create_rec_by_entry(db, &context);
-- if (!rec)
-- return ENODEV;
--
-- /* if discovery, print nodes that were found. */
-- if (drec)
-- print_fw_nodes(rec, info_level);
--
-- if (do_login)
-- ret = login_portal(db, NULL, rec);
-- free(rec);
--
-- /* print the fw node info if called in fw mode with no params */
-- if (!do_login && !drec)
-- fw_print_entry(&context);
-+ list_for_each_entry(context, &targets, list) {
-+ rec = fw_create_rec_by_entry(db, context);
-+ if (!rec) {
-+ log_error("Could not convert firmware info to "
-+ "node record.\n");
-+ break;
-+ }
-+
-+ if (drec) {
-+ ret = idbm_add_node(db, rec, NULL);
-+ if (ret) {
-+ log_error("Could not add node record. "
-+ "(err %d)\n", ret);
|
[-]
[+]
|
Deleted |
iscsi-initiator-utils-print-ibft-net-info.patch
^
|
@@ -1,221 +0,0 @@
-diff -aurp open-iscsi-2.0-868-test1/include/fw_context.h open-iscsi-2.0-868-test1.work/include/fw_context.h
---- open-iscsi-2.0-868-test1/include/fw_context.h 2008-03-25 03:37:26.000000000 -0500
-+++ open-iscsi-2.0-868-test1.work/include/fw_context.h 2008-03-25 03:37:37.000000000 -0500
-@@ -23,21 +23,30 @@
-
- struct boot_context {
- #define IQNSZ (223+1)
-+ /* target settings */
- int target_port;
-- char initiatorname[IQNSZ];
- char targetname[IQNSZ];
- char target_ipaddr[32];
- char chap_name[127];
- char chap_password[16];
- char chap_name_in[127];
- char chap_password_in[16];
-+
-+ /* initiator settings */
-+ char isid[10];
-+ char initiatorname[IQNSZ];
-+
-+ /* network settings */
-+ char dhcp[18];
- char iface[42];
- char mac[18];
- char ipaddr[18];
-+ char gateway[18];
-+ char primary_dns[18];
-+ char secondary_dns[18];
- char mask[18];
- char lun[17];
- char vlan[15];
-- char isid[10];
- };
-
- extern int fw_get_entry(struct boot_context *context, const char *filepath);
-diff -aurp open-iscsi-2.0-868-test1/utils/fwparam_ibft/fw_entry.c open-iscsi-2.0-868-test1.work/utils/fwparam_ibft/fw_entry.c
---- open-iscsi-2.0-868-test1/utils/fwparam_ibft/fw_entry.c 2008-03-25 03:37:26.000000000 -0500
-+++ open-iscsi-2.0-868-test1.work/utils/fwparam_ibft/fw_entry.c 2008-03-25 03:37:37.000000000 -0500
-@@ -34,24 +34,13 @@ int fw_get_entry(struct boot_context *co
- return ret;
- }
-
--/*
-- * Dump the 8 byte mac address
-- */
--static void dump_mac(struct boot_context *context)
--{
-- int i;
--
-- if (!strlen(context->mac))
-- return;
--
-- printf("iface.hwaddress = %s\n", context->mac);
--}
--
- static void dump_initiator(struct boot_context *context)
- {
-- if (!strlen(context->initiatorname))
-- return;
-- printf("iface.initiatorname = %s\n", context->initiatorname);
-+ if (strlen(context->initiatorname))
-+ printf("iface.initiatorname = %s\n", context->initiatorname);
-+
-+ if (strlen(context->isid))
-+ printf("iface.isid = %s\n", context->isid);
- }
-
- static void dump_target(struct boot_context *context)
-@@ -75,11 +64,44 @@ static void dump_target(struct boot_cont
- if (strlen(context->chap_password_in))
- printf("node.session.auth.password_in = %s\n",
- context->chap_password_in);
-+
-+ if (strlen(context->lun))
-+ printf("node.boot_lun = %s\n", context->lun);
-+}
-+
-+/* TODO: add defines for all the idbm strings in this file and add a macro */
-+static void dump_network(struct boot_context *context)
-+{
-+ /* Dump the 8 byte mac address (not iser support) */
-+ if (strlen(context->mac))
-+ printf("iface.hwaddress = %s\n", context->mac);
-+ /*
-+ * If this has a valid address then DHCP was used (broadcom sends
-+ * 0.0.0.0).
-+ */
-+ if (strlen(context->dhcp) && strcmp(context->dhcp, "0.0.0.0"))
-+ printf("iface.bootproto = DHCP\n");
-+ else
-+ printf("iface.bootproto = STATIC\n");
-+ if (strlen(context->ipaddr))
-+ printf("iface.ipaddress = %s\n", context->ipaddr);
-+ if (strlen(context->mask))
-+ printf("iface.subnet_mask = %s\n", context->mask);
-+ if (strlen(context->gateway))
-+ printf("iface.gateway = %s\n", context->gateway);
-+ if (strlen(context->primary_dns))
-+ printf("iface.primary_dns = %s\n", context->primary_dns);
-+ if (strlen(context->secondary_dns))
-+ printf("iface.secondary_dns = %s\n", context->secondary_dns);
-+ if (strlen(context->vlan))
-+ printf("iface.vlan = %s\n", context->vlan);
-+ if (strlen(context->iface))
-+ printf("iface.net_ifacename = %s\n", context->iface);
- }
-
- void fw_print_entry(struct boot_context *context)
- {
- dump_initiator(context);
-- dump_mac(context);
-+ dump_network(context);
- dump_target(context);
- }
-diff -aurp open-iscsi-2.0-868-test1/utils/fwparam_ibft/fwparam_ibft_sysfs.c open-iscsi-2.0-868-test1.work/utils/fwparam_ibft/fwparam_ibft_sysfs.c
---- open-iscsi-2.0-868-test1/utils/fwparam_ibft/fwparam_ibft_sysfs.c 2008-03-25 03:37:26.000000000 -0500
-+++ open-iscsi-2.0-868-test1.work/utils/fwparam_ibft/fwparam_ibft_sysfs.c 2008-03-25 04:08:10.000000000 -0500
-@@ -24,11 +24,15 @@
- #include <unistd.h>
- #include <fcntl.h>
- #include <errno.h>
--#include "fwparam_ibft.h"
-+#include <dirent.h>
- #include <fw_context.h>
-+#include <sys/types.h>
-+
-+#include "fwparam_ibft.h"
-
- #define IBFT_MAX 255
- #define IBFT_SYSFS_ROOT "/sys/firmware/ibft/"
-+#define IBFT_SYSFS_DE
-
- static char *target_list[IBFT_MAX];
- static char *nic_list[IBFT_MAX];
-@@ -143,6 +147,48 @@ static int find_sysfs_dirs(const char *f
- return 0;
- }
-
-+static int get_iface_from_device(const char *eth_dir,
-+ struct boot_context *context)
-+{
-+ char dev_dir[FILENAMESZ];
-+ int rc = ENODEV;
-+ DIR *dirfd;
-+ struct dirent *dent;
-+
-+ memset(dev_dir, 0, FILENAMESZ);
-+ strncat(dev_dir, eth_dir, FILENAMESZ);
-+ strncat(dev_dir, "/device", FILENAMESZ);
-+
-+ if (!file_exist(dev_dir))
-+ return 0;
-+
-+ dirfd = opendir(dev_dir);
-+ if (!dirfd)
-+ return errno;
-+
-+ while ((dent = readdir(dirfd))) {
-+ if (!strcmp(dent->d_name, ".") || !strcmp(dent->d_name, ".."))
-+ continue;
-+
-+ if (strncmp(dent->d_name, "net:", 4))
-+ continue;
-+
-+ if ((strlen(dent->d_name) - 4) > (sizeof(context->iface) - 1)) {
-+ rc = EINVAL;
-+ printf("Net device %s too bug for iface buffer.\n",
-+ dent->d_name);
-+ break;
-+ }
-+
-+ if (sscanf(dent->d_name, "net:%s", context->iface) != 1)
-+ rc = EINVAL;
-+ rc = 0;
-+ break;
-+ }
-+
-+ return rc;
-+}
-+
- /*
- * Routines to fill in the context values.
- */
-@@ -154,7 +200,17 @@ static int fill_nic_context(const char *
- rc |= read_data(dir, "/vlan", context->vlan, sizeof(context->vlan));
- rc |= read_data(dir, "/ip-addr", context->ipaddr,
- sizeof(context->ipaddr));
-- rc |= read_data(dir, "/mask", context->mask, sizeof(context->mask));
-+ rc |= read_data(dir, "/subnet-mask", context->mask,
-+ sizeof(context->mask));
-+ rc |= read_data(dir, "/gateway", context->gateway,
-+ sizeof(context->gateway));
-+ rc |= read_data(dir, "/primary-dns", context->primary_dns,
-+ sizeof(context->primary_dns));
-+ rc |= read_data(dir, "/secondary-dns", context->secondary_dns,
-+ sizeof(context->secondary_dns));
-+ rc |= read_data(dir, "/dhcp", context->dhcp, sizeof(context->dhcp));
-+
|
[-]
[+]
|
Deleted |
iscsi-initiator-utils-update-initscripts-and-docs.patch
^
|
@@ -1,131 +0,0 @@
-diff -aurp open-iscsi-2.0-868-test1/etc/iscsid.conf open-iscsi-2.0-868-test1.tmp/etc/iscsid.conf
---- open-iscsi-2.0-868-test1/etc/iscsid.conf 2008-01-03 13:23:36.000000000 -0600
-+++ open-iscsi-2.0-868-test1.tmp/etc/iscsid.conf 2008-01-03 13:55:59.000000000 -0600
-@@ -27,8 +20,8 @@
- # To request that the iscsi initd scripts startup a session set to "automatic".
- # node.startup = automatic
- #
--# To manually startup the session set to "manual". The default is manual.
--node.startup = manual
-+# To manually startup the session set to "manual". The default is automatic.
-+node.startup = automatic
-
- # *************
- # CHAP Settings
-@@ -92,17 +85,6 @@ node.conn[0].timeo.noop_out_interval = 5
- # this will cause the IO to be failed to the multipath layer.
- node.conn[0].timeo.noop_out_timeout = 5
-
--# To specify the time to wait for abort response before
--# failing the operation and trying a logical unit reset edit the line.
--# The value is in seconds and the default is 15 seconds.
--node.session.err_timeo.abort_timeout = 15
--
--# To specify the time to wait for a logical unit response
--# before failing the operation and trying session re-establishment
--# edit the line.
--# The value is in seconds and the default is 30 seconds.
--node.session.err_timeo.lu_reset_timeout = 20
--
- #******
- # Retry
- #******
-@@ -188,41 +170,24 @@ node.conn[0].iscsi.MaxRecvDataSegmentLen
- discovery.sendtargets.iscsi.MaxRecvDataSegmentLength = 32768
-
- # To allow the targets to control the setting of the digest checking,
--# with the initiator requesting a preference of enabling the checking, uncomment# one or both of the following lines:
-+# with the initiator requesting a preference of enabling the checking, uncommen
-+# the following lines (Data digests are not supported and on ppc/ppc64
-+# both header and data digests are not supported.):
- #node.conn[0].iscsi.HeaderDigest = CRC32C,None
--#node.conn[0].iscsi.DataDigest = CRC32C,None
- #
- # To allow the targets to control the setting of the digest checking,
- # with the initiator requesting a preference of disabling the checking,
--# uncomment one or both of the following lines:
-+# uncomment the following lines:
- #node.conn[0].iscsi.HeaderDigest = None,CRC32C
--#node.conn[0].iscsi.DataDigest = None,CRC32C
- #
- # To enable CRC32C digest checking for the header and/or data part of
--# iSCSI PDUs, uncomment one or both of the following lines:
-+# iSCSI PDUs, uncomment the following lines:
- #node.conn[0].iscsi.HeaderDigest = CRC32C
--#node.conn[0].iscsi.DataDigest = CRC32C
- #
- # To disable digest checking for the header and/or data part of
--# iSCSI PDUs, uncomment one or both of the following lines:
-+# iSCSI PDUs, uncomment the following lines:
- #node.conn[0].iscsi.HeaderDigest = None
--#node.conn[0].iscsi.DataDigest = None
- #
- # The default is to never use DataDigests and to allow the target to control
- # the setting of the HeaderDigest checking with the initiator requesting
- # a preference of disabling the checking.
--
--#************
--# Workarounds
--#************
--
--# Some targets like IET prefer after an initiator has sent a task
--# management function like an ABORT TASK or LOGICAL UNIT RESET, that
--# it does not respond to PDUs like R2Ts. To enable this behavior uncomment
--# the following line (The default behavior is Yes):
--node.session.iscsi.FastAbort = Yes
--
--# Some targets like Equalogic prefer that after an initiator has sent
--# a task management function like an ABORT TASK or LOGICAL UNIT RESET, that
--# it continue to respond to R2Ts. To enable this uncomment this line
--# node.session.iscsi.FastAbort = No
-diff -aurp open-iscsi-2.0-868-test1/README open-iscsi-2.0-868-test1.tmp/README
---- open-iscsi-2.0-868-test1/README 2008-01-03 13:23:36.000000000 -0600
-+++ open-iscsi-2.0-868-test1.tmp/README 2008-01-03 13:53:11.000000000 -0600
-@@ -78,11 +78,6 @@ the cache sync command will fail.
- - iscsiadm's -P 3 option will not print out scsi devices.
- - iscsid will not automatically online devices.
-
--You need to enable "Cryptographic API" under "Cryptographic options" in the
--kernel config. And you must enable "CRC32c CRC algorithm" even if
--you do not use header or data digests. They are the kernel options,
--CONFIG_CRYPTO and CONFIG_CRYPTO_CRC32C, respectively.
--
- By default the kernel source found at
- /lib/modules/`uname -a`/build
- will be used to compile the open-iscsi modules. To specify a different
-@@ -613,7 +608,7 @@ Red Hat or Fedora:
- -----------------
- To start open-iscsi in Red Hat/Fedora you can do:
-
-- service open-iscsi start
-+ service iscsi start
-
- To get open-iscsi to automatically start at run time you may have to
- run:
-@@ -792,6 +778,8 @@ To login to all the automated nodes, sim
- e.g /etc/init.d/open-iscsi restart. On your next startup the nodes will
- be logged into autmotically.
-
-+To set the startup value, so that nodes are not logged into automatically
-+use the value "manual".
-
- 8. Advanced Configuration
- =========================
-diff -aurp open-iscsi-2.0-868-test1/usr/idbm.c open-iscsi-2.0-868-test1.tmp/usr/idbm.c
---- open-iscsi-2.0-868-test1/usr/idbm.c 2008-01-03 13:23:36.000000000 -0600
-+++ open-iscsi-2.0-868-test1.tmp/usr/idbm.c 2008-01-03 13:52:01.000000000 -0600
-@@ -364,10 +364,14 @@ idbm_recinfo_node(node_rec_t *r, recinfo
- __recinfo_int_o4(key, ri, r, conn[i].iscsi.HeaderDigest,
- IDBM_SHOW, "None", "CRC32C", "CRC32C,None",
- "None,CRC32C", num);
-+/*
-+ We only support data digests
-+
- sprintf(key, "node.conn[%d].iscsi.DataDigest", i);
- __recinfo_int_o4(key, ri, r, conn[i].iscsi.DataDigest, IDBM_SHOW,
- "None", "CRC32C", "CRC32C,None",
- "None,CRC32C", num);
-+*/
- sprintf(key, "node.conn[%d].iscsi.IFMarker", i);
- __recinfo_int_o2(key, ri, r, conn[i].iscsi.IFMarker, IDBM_SHOW,
- "No", "Yes", num);
|
[-]
[+]
|
Deleted |
iscsi-initiator-utils-update-startup-doc.patch
^
|
@@ -1,37 +0,0 @@
---- open-iscsi-2.0-868-test1/README 2008-03-14 12:28:27.000000000 -0500
-+++ open-iscsi-2.0-868-test1.work/README 2008-03-14 12:29:06.000000000 -0500
-@@ -225,11 +225,11 @@ Usage: iscsiadm [OPTION]
- Stats prints the iSCSI stats for the session.
- -m node --logoutall=[all|manual|automatic]
- Logout "all" the running sessions or just the ones
-- with a node or conn startup value manual or automatic.
-+ with a node startup value manual or automatic.
- Nodes marked as ONBOOT are skipped.
- -m node --loginall=[all|manual|automatic]
- Login "all" the running sessions or just the ones
-- with a node or conn startup value manual or automatic.
-+ with a node startup value manual or automatic.
- Nodes marked as ONBOOT are skipped.
- -m session display all active sessions and connections
- -m session --sid=[sid] [ --print=level | --rescan | --logout ]
-@@ -769,16 +769,16 @@ Note: this may only work for distros wit
- To automate login to a node, use the following with the record ID
- (record ID is the targetname and portal) of the node discovered in the
- discovery above:
-- iscsiadm -m node -T targetname -p ip:port --op update -n node.conn[0].startup -v automatic
-+ iscsiadm -m node -T targetname -p ip:port --op update -n node.startup -v automatic
-
- To set the automatic setting to all portals on a target through every
- interface setup for each protal, the following can be run:
-- iscsiadm -m node -T targetname --op update -n node.conn[0].startup -v automatic
-+ iscsiadm -m node -T targetname --op update -n node.startup -v automatic
-
--Or to set the "node.conn[0].statup" attribute to "startup" as default for
-+Or to set the "node.startup" attribute to "startup" as default for
- all sessions add the following to the /etc/iscsi/iscsid.conf:
-
-- node.conn[0].startup = automatic
-+ node.startup = automatic
-
- Setting this in iscsid.conf, will not affect existing nodes. It will only
- affect nodes that are discovered after setting the value.
|
[-]
[+]
|
Deleted |
iscsi-initiator-utils-use-new-tpgt.patch
^
|
@@ -1,110 +0,0 @@
-diff -aurp open-iscsi-2.0-868-test1.orig/usr/discovery.c open-iscsi-2.0-868-test1/usr/discovery.c
---- open-iscsi-2.0-868-test1.orig/usr/discovery.c 2008-01-23 12:13:55.000000000 -0600
-+++ open-iscsi-2.0-868-test1/usr/discovery.c 2008-01-23 12:14:25.000000000 -0600
-@@ -981,7 +981,6 @@ redirect_reconnect:
- break;
-
- case LOGIN_IO_ERROR:
-- case LOGIN_WRONG_PORTAL_GROUP:
- case LOGIN_REDIRECTION_FAILED:
- /* try again */
- log_warning("retrying discovery login to %s", host);
-diff -aurp open-iscsi-2.0-868-test1.orig/usr/initiator.c open-iscsi-2.0-868-test1/usr/initiator.c
---- open-iscsi-2.0-868-test1.orig/usr/initiator.c 2008-01-23 12:13:55.000000000 -0600
-+++ open-iscsi-2.0-868-test1/usr/initiator.c 2008-01-23 12:14:25.000000000 -0600
-@@ -149,7 +149,6 @@ __login_response_status(iscsi_conn_t *co
- case LOGIN_REDIRECT:
- return CONN_LOGIN_IMM_REDIRECT_RETRY;
- case LOGIN_IO_ERROR:
-- case LOGIN_WRONG_PORTAL_GROUP:
- case LOGIN_REDIRECTION_FAILED:
- return CONN_LOGIN_RETRY;
- default:
-diff -aurp open-iscsi-2.0-868-test1.orig/usr/initiator.h open-iscsi-2.0-868-test1/usr/initiator.h
---- open-iscsi-2.0-868-test1.orig/usr/initiator.h 2008-01-23 12:13:55.000000000 -0600
-+++ open-iscsi-2.0-868-test1/usr/initiator.h 2008-01-23 12:14:25.000000000 -0600
-@@ -75,10 +75,9 @@ enum iscsi_login_status {
- LOGIN_VERSION_MISMATCH = 3,
- LOGIN_NEGOTIATION_FAILED = 4,
- LOGIN_AUTHENTICATION_FAILED = 5,
-- LOGIN_WRONG_PORTAL_GROUP = 6,
-- LOGIN_REDIRECTION_FAILED = 7,
-- LOGIN_INVALID_PDU = 8,
-- LOGIN_REDIRECT = 9,
-+ LOGIN_REDIRECTION_FAILED = 6,
-+ LOGIN_INVALID_PDU = 7,
-+ LOGIN_REDIRECT = 8,
- };
-
- typedef enum iscsi_event_e {
-diff -aurp open-iscsi-2.0-868-test1.orig/usr/login.c open-iscsi-2.0-868-test1/usr/login.c
---- open-iscsi-2.0-868-test1.orig/usr/login.c 2008-01-23 12:13:55.000000000 -0600
-+++ open-iscsi-2.0-868-test1/usr/login.c 2008-01-23 12:14:25.000000000 -0600
-@@ -264,24 +264,20 @@ get_security_text_keys(iscsi_session_t *
- &value, &value_end)) {
- /*
- * We should have already obtained this
-- * via discovery.
-- * We've already picked an isid, so the
-- * most we can do is confirm we reached
-- * the portal group we were expecting to
-+ * via discovery, but the value could be stale.
-+ * If the target was reconfigured it will send us
-+ * the updated tpgt.
- */
- tag = strtoul(value, NULL, 0);
- if (session->portal_group_tag >= 0) {
-- if (tag != session->portal_group_tag) {
-- log_error("Portal group tag "
-+ if (tag != session->portal_group_tag)
-+ log_debug(2, "Portal group tag "
- "mismatch, expected %u, "
-- "received %u",
-+ "received %u. Updating",
- session->portal_group_tag, tag);
-- return LOGIN_WRONG_PORTAL_GROUP;
-- }
-- } else
-- /* we now know the tag */
-- session->portal_group_tag = tag;
--
-+ }
-+ /* we now know the tag */
-+ session->portal_group_tag = tag;
- text = value_end;
- } else {
- /*
-@@ -339,21 +335,22 @@ get_op_params_text_keys(iscsi_session_t
- }
- } else if (iscsi_find_key_value("TargetPortalGroupTag", text, end,
- &value, &value_end)) {
-+ int tag = strtoul(value, NULL, 0);
- /*
-- * confirm we reached the portal group we were expecting to
-+ * We should have already obtained this
-+ * via discovery, but the value could be stale.
-+ * If the target was reconfigured it will send us
-+ * the updated tpgt.
- */
-- int tag = strtoul(value, NULL, 0);
- if (session->portal_group_tag >= 0) {
-- if (tag != session->portal_group_tag) {
-- log_error("Portal group tag mismatch, "
-- "expected %u, received %u",
-+ if (tag != session->portal_group_tag)
-+ log_debug(2, "Portal group tag "
-+ "mismatch, expected %u, "
-+ "received %u. Updating",
- session->portal_group_tag, tag);
-- return LOGIN_WRONG_PORTAL_GROUP;
-- }
-- } else
-- /* we now know the tag */
-- session->portal_group_tag = tag;
--
-+ }
-+ /* we now know the tag */
-+ session->portal_group_tag = tag;
- text = value_end;
- } else if (iscsi_find_key_value("InitialR2T", text, end, &value,
- &value_end)) {
|
[-]
[+]
|
Deleted |
iscsi-initiator-utils-use-var-for-config.patch
^
|
@@ -1,161 +0,0 @@
-diff -aurp open-iscsi-2.0-868-test1/doc/iscsiadm.8 open-iscsi-2.0-868-test1.tmp/doc/iscsiadm.8
---- open-iscsi-2.0-868-test1/doc/iscsiadm.8 2008-01-03 14:07:04.000000000 -0600
-+++ open-iscsi-2.0-868-test1.tmp/doc/iscsiadm.8 2008-01-03 14:08:44.000000000 -0600
-@@ -47,7 +47,7 @@ display help text and exit
- .TP
- \fB\-I\fR, \fB\-\-interface\fI[iface]\fR
- The interface argument specifies the iSCSI interface to use for the operation.
--iSCSI interfaces (iface) are defined in /etc/iscsi/ifaces. For hardware
-+iSCSI interfaces (iface) are defined in /var/lib/iscsi/ifaces. For hardware
- or offload, the iface config must have the hardware address (iface.hwaddress)
- and the driver/transport_name (iface.transport_name). The iface's name is
- then the filename of the iface config. For software iSCSI, the iface config
-@@ -310,10 +310,10 @@ The configuration file read by \fBiscsid
- The file containing the iSCSI InitiatorName and InitiatorAlias read by
- \fBiscsid\fR and \fBiscsiadm\fR on startup.
- .TP
--/etc/iscsi/nodes/
-+/var/lib/iscsi/nodes/
- This directory contains the nodes with their targets.
- .TP
--/etc/iscsi/send_targets
-+/var/lib/iscsi/send_targets
- This directory contains the portals.
-
- .SH "SEE ALSO"
-diff -aurp open-iscsi-2.0-868-test1/README open-iscsi-2.0-868-test1.tmp/README
---- open-iscsi-2.0-868-test1/README 2008-01-03 14:07:04.000000000 -0600
-+++ open-iscsi-2.0-868-test1.tmp/README 2008-01-03 14:05:35.000000000 -0600
-@@ -138,10 +138,10 @@ available on all Linux installations.
-
- The database contains two tables:
-
--- Discovery table (/etc/iscsi/send_targets);
--- Node table (/etc/iscsi/nodes).
-+- Discovery table (/var/lib/iscsi/send_targets);
-+- Node table (/var/lib/iscsi/nodes).
-
--The regular place for iSCSI database files: /etc/iscsi/nodes
-+The regular place for iSCSI database files: /var/lib/iscsi/nodes
-
- The iscsiadm utility is a command-line tool to manage (update, delete,
- insert, query) the persistent database.
-@@ -288,7 +288,7 @@ a scsi_host per HBA port).
- To manage both types of initiator stacks, iscsiadm uses the interface (iface)
- structure. For each HBA port or for software iscsi for each network
- device (ethX) or NIC, that you wish to bind sessions to you must create
--a iface config /etc/iscsi/ifaces.
-+a iface config /var/lib/iscsi/ifaces.
-
- When you run iscsiadm the first time a hardware iscsi driver like qla4xxx is
- loaded, iscsiadm will create default iface configs for you. The config created
-@@ -301,29 +301,29 @@ Running:
- iface0 qla4xxx,00:c0:dd:08:63:e8,default
- iface1 qla4xxx,00:c0:dd:08:63:ea,default
-
--Will report iface configurations that are setup in /etc/iscsi/ifaces.
-+Will report iface configurations that are setup in /var/lib/iscsi/ifaces.
- The format is:
-
- iface_name transport_name,hwaddress,net_ifacename
-
- For software iscsi, you can create the iface configs by hand, but it is
- reccomended that you use iscsiadm's iface mode. There is a iface.example in
--/etc/iscsi/ifaces which can be used as a template for the daring.
-+/var/lib/iscsi/ifaces which can be used as a template for the daring.
-
- For each network object you wish to bind a session to you must create
--a seperate iface config in /etc/iscsi/ifaces and each iface config file
-+a seperate iface config in /var/lib/iscsi/ifaces and each iface config file
- must have a unique name which is less than or equal to 64 characters.
-
- Example:
-
- If you have NIC1 with MAC address 00:0F:1F:92:6B:BF and NIC2 with
- MAC address 00:C0:DD:08:63:E7 and you wanted to do software iscsi over
--TCP/IP. Then in /etc/iscsi/ifaces/iface0 you would enter:
-+TCP/IP. Then in /var/lib/iscsi/ifaces/iface0 you would enter:
-
- iface.transport_name = tcp
- iface.hwaddress = 00:0F:1F:92:6B:BF
-
--and in /etc/iscsi/ifaces/iface1 you would enter:
-+and in /var/lib/iscsi/ifaces/iface1 you would enter:
-
- iface.transport_name = tcp
- iface.hwaddress = 00:C0:DD:08:63:E7
-@@ -347,7 +347,7 @@ but you have not logged in then, iscsiad
- all existing bindings.
-
- When you then run iscsiadm to do discovery, it will check for interfaces
--in /etc/iscsi/ifaces and bind the portals that are discovered so that
-+in /var/lib/iscsi/ifaces and bind the portals that are discovered so that
- they will be logged in through each iface. This behavior can also be overriden
- by passing in the interfaces you want to use. For example if you had defined
- two interface but only wanted to use one you can use the
-@@ -361,7 +361,7 @@ we do not bind a session to a iface, the
-
- iscsiadm -m discovery -t st -p ip:port -I default -P 1
-
--And if you did not define any interfaces in /etc/iscsi/ifaces and do
-+And if you did not define any interfaces in /var/lib/iscsi/ifaces and do
- not pass anything into iscsiadm, running iscsiadm will do the default
- behavior, where we allow the network subsystem to decide which
- device to use.
-@@ -396,13 +396,13 @@ iscsiadm -m node -p ip:port -I iface0 --
-
- ./iscsiadm -m discovery -t sendtargets -p 192.168.1.1:3260
-
-- This will first search /etc/iscsi/ifaces for interfaces
-+ This will first search /var/lib/iscsi/ifaces for interfaces
- using software iscsi. If any are found then nodes found during
- discovery will be setup so that they can logged in through
- those interfaces.
-
- - SendTargets iSCSI Discovery with a specific interface. If you
-- wish to only use a subset of the interfaces in /etc/iscsi/ifaces
-+ wish to only use a subset of the interfaces in /var/lib/iscsi/ifaces
- then you can pass them in during discovery:
-
- ./iscsiadm -m discovery -t sendtargets -p 192.168.1.1:3260 \
-diff -aurp open-iscsi-2.0-868-test1/usr/idbm.c open-iscsi-2.0-868-test1.tmp/usr/idbm.c
---- open-iscsi-2.0-868-test1/usr/idbm.c 2008-01-03 14:07:04.000000000 -0600
-+++ open-iscsi-2.0-868-test1.tmp/usr/idbm.c 2008-01-03 14:03:36.000000000 -0600
-@@ -2582,9 +2582,9 @@ idbm_init(idbm_get_config_file_fn *fn)
- idbm_t *db;
-
- /* make sure root db dir is there */
-- if (access(ISCSI_CONFIG_ROOT, F_OK) != 0) {
-- if (mkdir(ISCSI_CONFIG_ROOT, 0660) != 0) {
-- log_error("Could not make %s %d\n", ISCSI_CONFIG_ROOT,
-+ if (access(ISCSIVAR, F_OK) != 0) {
-+ if (mkdir(ISCSIVAR, 0660) != 0) {
-+ log_error("Could not make %s %d\n", ISCSIVAR,
- errno);
- return NULL;
- }
-Only in open-iscsi-2.0-868-test1.tmp/usr: idbm.c.orig
-diff -aurp open-iscsi-2.0-868-test1/usr/idbm.h open-iscsi-2.0-868-test1.tmp/usr/idbm.h
---- open-iscsi-2.0-868-test1/usr/idbm.h 2008-01-03 13:23:36.000000000 -0600
-+++ open-iscsi-2.0-868-test1.tmp/usr/idbm.h 2008-01-03 14:03:36.000000000 -0600
-@@ -26,12 +26,14 @@
- #include "initiator.h"
- #include "config.h"
-
--#define NODE_CONFIG_DIR ISCSI_CONFIG_ROOT"nodes"
--#define IFACE_CONFIG_DIR ISCSI_CONFIG_ROOT"ifaces"
--#define SLP_CONFIG_DIR ISCSI_CONFIG_ROOT"slp"
--#define ISNS_CONFIG_DIR ISCSI_CONFIG_ROOT"isns"
--#define STATIC_CONFIG_DIR ISCSI_CONFIG_ROOT"static"
--#define ST_CONFIG_DIR ISCSI_CONFIG_ROOT"send_targets"
-+#define ISCSIVAR "/var/lib/iscsi/"
-+
-+#define NODE_CONFIG_DIR ISCSIVAR"nodes"
-+#define IFACE_CONFIG_DIR ISCSIVAR"ifaces"
-+#define SLP_CONFIG_DIR ISCSIVAR"slp"
-+#define ISNS_CONFIG_DIR ISCSIVAR"isns"
-+#define STATIC_CONFIG_DIR ISCSIVAR"static"
-+#define ST_CONFIG_DIR ISCSIVAR"send_targets"
- #define ST_CONFIG_NAME "st_config"
-
- #define TYPE_INT 0
|