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:
Bart Van Assche
2013-10-14 15:21:30 +00:00
parent c65a4462dc
commit db2c0442d3
2 changed files with 4 additions and 2 deletions
+3 -1
View File
@@ -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
View File
@@ -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();
}
}