Home | History | Annotate | Download | only in iscsi

Lines Matching defs:session

44 static uint16_t current_id = 0;	/* Global session ID counter */
249 * sid The ID of the affected session
382 * Find a session by ID.
384 * Parameter: the session ID
386 * Returns: The pointer to the session (or NULL if not found)
408 * Parameter: the session pointer and the connection ID
429 * Reference a session
431 * Session cannot be release until reference count reaches zero
454 * Unreference a session
456 * Release session reference, trigger cleanup
460 unref_session(session_t *session)
464 KASSERT(session != NULL);
465 KASSERT(session->s_refcount > 0);
466 if (--session->s_refcount == 0)
467 cv_broadcast(&session->s_sess_cv);
602 * Terminate the session as gracefully as possible.
605 * session Session to terminate
626 DEB(5, ("Session %u already gone\n", sid));
633 DEB(5, ("Session is being killed with status %d\n",sess->s_terminating));
638 * don't do anything if session isn't established yet, termination will be
644 DEB(5, ("Session is being killed which is not yet established\n"));
653 * requested that we kill a multipathed session.
669 DEB(5, ("Session is being killed while in use (refcnt = %d)\n",
674 /* Remove session from global list */
708 * session IN: The owning session
723 DEB(1, ("Create Connection for Session %d\n", sess->s_id));
863 DEBC(conn, 0, ("Session terminating\n"));
905 DEB(1, ("ReCreate Connection %d for Session %d, ERL=%d\n",
1099 * Handle the login ioctl - Create a session:
1100 * Alloc the session structure
1101 * Copy session parameters
1126 /* alloc the session */
1129 DEBOUT(("No mem for session\n"));
1137 cv_init(&sess->s_sess_cv, "session");
1167 /* Session established, map LUNs? */
1171 DEB(1, ("Login: map session %d\n", sess->s_id));
1173 DEB(1, ("Login: map session %d failed\n", sess->s_id));
1185 * Handle the logout ioctl - Kill a session.
1194 session_t *session;
1196 DEB(5, ("ISCSI: logout session %d\n", par->session_id));
1199 if ((session = find_session(par->session_id)) == NULL) {
1201 DEBOUT(("Session %d not found\n", par->session_id));
1206 /* If the session exists, this always succeeds */
1227 session_t *session;
1229 DEB(5, ("ISCSI: add_connection to session %d\n", par->session_id));
1232 if ((session = find_session(par->session_id)) == NULL) {
1234 DEBOUT(("Session %d not found\n", par->session_id));
1244 return create_connection(par, session, l);
1260 session_t *session;
1262 DEB(5, ("ISCSI: remove_connection %d from session %d\n",
1266 if ((session = find_session(par->session_id)) == NULL) {
1268 DEBOUT(("Session %d not found\n", par->session_id));
1273 if ((conn = find_connection(session, par->connection_id)) == NULL) {
1275 DEBOUT(("Connection %d not found in session %d\n",
1303 DEB(1, ("ISCSI: restore_connection %d of session %d\n",
1309 DEBOUT(("Session %d not found\n", par->session_id));
1315 DEBOUT(("Connection %d not found in session %d\n",
1349 session_t *session;
1355 if ((session = find_session(par->session_id)) == NULL) {
1357 DEBOUT(("Session %d not found\n", par->session_id));
1390 par->status = send_io_command(session, par->lun, &par->req,
1425 * the response is kept in the session structure so it can be
1444 DEBOUT(("Session %d not found\n", par->session_id));
1544 DEB(9, ("ISCSI: connection_status, session %d connection %d --> %d\n",
1626 * remove a connection from session and add to the cleanup list
1731 * Global thread to handle connection and session cleanup after termination.
1791 DEB(1, ("Cleanup: session %d\n", sess->s_id));
1812 DEB(1, ("Cleanup: Unmap session %d\n", sess->s_id));
1814 DEB(1, ("Cleanup: Unmap session %d failed\n", sess->s_id));
1823 /* notify event handlers of session shutdown */
1825 DEB(1, ("Cleanup: session ended %d\n", sess->s_id));