• Nicholas Bellinger's avatar
    iscsi-target: Convert iscsi_thread_set usage to kthread.h · 503e797e
    Nicholas Bellinger authored
    commit 88dcd2da upstream.
    
    This patch converts iscsi-target code to use modern kthread.h API
    callers for creating RX/TX threads for each new iscsi_conn descriptor,
    and releasing associated RX/TX threads during connection shutdown.
    
    This is done using iscsit_start_kthreads() -> kthread_run() to start
    new kthreads from within iscsi_post_login_handler(), and invoking
    kthread_stop() from existing iscsit_close_connection() code.
    
    Also, convert iscsit_logout_post_handler_closesession() code to use
    cmpxchg when determing when iscsit_cause_connection_reinstatement()
    needs to sleep waiting for completion.
    Reported-by: default avatarSagi Grimberg <sagig@mellanox.com>
    Tested-by: default avatarSagi Grimberg <sagig@mellanox.com>
    Cc: Slava Shwartsman <valyushash@gmail.com>
    Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
    [ luis: backported to 3.16:
      - file rename: include/target/iscsi/iscsi_target_core.h ->
        drivers/target/iscsi/iscsi_target_core.h
      - adjusted context ]
    Signed-off-by: default avatarLuis Henriques <luis.henriques@canonical.com>
    503e797e
iscsi_target_login.c 40.3 KB