mirror of
https://github.com/SCST-project/scst.git
synced 2026-08-20 22:26:23 +00:00
scst: Rework r5023
Avoid that session reassignment can trigger a crash with iscsi-scst or scst_local by not generating a UA from inside scst_tg_init_tgt_dev(). Not generating an ALUA UA upon LUN addition is fine since such LUN addition will trigger a REPORTED LUNS DATA HAS CHANGED UA anyway. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5072 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
+3
-1
@@ -2486,7 +2486,7 @@ static void scst_check_reassign_sess(struct scst_session *sess)
|
||||
acg->acg_name);
|
||||
|
||||
old_acg = sess->acg;
|
||||
sess->acg = acg;
|
||||
sess->acg = NULL; /* to catch implicit dependencies earlier */
|
||||
|
||||
retry_add:
|
||||
add_failed = false;
|
||||
@@ -2559,6 +2559,8 @@ next:
|
||||
goto retry_add;
|
||||
}
|
||||
|
||||
sess->acg = acg;
|
||||
|
||||
TRACE_DBG("Moving sess %p from acg %s to acg %s", sess,
|
||||
old_acg->acg_name, acg->acg_name);
|
||||
list_move_tail(&sess->acg_sess_list_entry, &acg->acg_sess_list);
|
||||
|
||||
+1
-1
@@ -426,7 +426,7 @@ void scst_tg_init_tgt_dev(struct scst_tgt_dev *tgt_dev)
|
||||
if (dg) {
|
||||
tg = __lookup_tg_by_tgt(dg, tgt_dev->acg_dev->acg->tgt);
|
||||
if (tg) {
|
||||
scst_tg_change_tgt_dev_state(tgt_dev, tg->state, true);
|
||||
scst_update_tgt_dev_alua_filter(tgt_dev, tg->state);
|
||||
scst_check_alua_invariant();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user