After doing all of the loging dance to get the target's params it makes
authorclaudio <claudio@openbsd.org>
Sun, 20 Apr 2014 20:12:31 +0000 (20:12 +0000)
committerclaudio <claudio@openbsd.org>
Sun, 20 Apr 2014 20:12:31 +0000 (20:12 +0000)
sense to merge them into the active set. At least that way we run with
the right params and finally do reads and writes that are > 8k.

usr.sbin/iscsid/connection.c
usr.sbin/iscsid/session.c

index d012500..b8555a2 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: connection.c,v 1.15 2014/04/20 18:17:12 claudio Exp $ */
+/*     $OpenBSD: connection.c,v 1.16 2014/04/20 20:12:31 claudio Exp $ */
 
 /*
  * Copyright (c) 2009 Claudio Jeker <claudio@openbsd.org>
@@ -449,6 +449,7 @@ c_do_login(struct connection *c, enum c_event ev)
 int
 c_do_loggedin(struct connection *c, enum c_event ev)
 {
+       iscsi_merge_conn_params(&c->active, &c->mine, &c->his);
        session_fsm(c->session, SESS_EV_CONN_LOGGED_IN, c);
 
        return CONN_LOGGED_IN;
index d58f53a..2ec59b6 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: session.c,v 1.5 2014/04/20 16:52:11 claudio Exp $ */
+/*     $OpenBSD: session.c,v 1.6 2014/04/20 20:12:31 claudio Exp $ */
 
 /*
  * Copyright (c) 2011 Claudio Jeker <claudio@openbsd.org>
@@ -297,10 +297,13 @@ sess_do_conn_loggedin(struct session *s, struct sessev *sev)
        if (s->state & SESS_LOGGED_IN)
                return SESS_LOGGED_IN;
 
-       if (s->config.SessionType == SESSION_TYPE_DISCOVERY)
+       if (s->config.SessionType == SESSION_TYPE_DISCOVERY) {
                initiator_discovery(s);
-       else
-               vscsi_event(VSCSI_REQPROBE, s->target, -1);
+               return SESS_LOGGED_IN;
+       }
+
+       iscsi_merge_sess_params(&s->active, &s->mine, &s->his);
+       vscsi_event(VSCSI_REQPROBE, s->target, -1);
 
        return SESS_LOGGED_IN;
 }