[SCSI] iscsi: fix command requeues during iscsi recovery

Do not flush queues then block session. This will cause commands
to needlessly swing around on us and remove goofy
recovery_failed field and replace with state value.

And do not start recovery from within the host reset function.
This causeis too many problems becuase open-iscsi was desinged to
call out to userspace then have userpscae decide if we should
go into recovery or kill the session.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
此提交包含在:
Mike Christie
2006-05-18 20:31:42 -05:00
提交者 James Bottomley
父節點 790f39a2d5
當前提交 656cffc95f
共有 3 個檔案被更改,包括 50 行新增42 行删除

查看文件

@@ -210,7 +210,6 @@ struct iscsi_session {
* - mgmtpool, *
* - r2tpool */
int state; /* session state */
int recovery_failed;
struct list_head item;
int conn_cnt;
int age; /* counts session re-opens */
@@ -241,8 +240,6 @@ iscsi_session_setup(struct iscsi_transport *, struct scsi_transport_template *,
int, int, uint32_t, uint32_t *);
extern void iscsi_session_teardown(struct iscsi_cls_session *);
extern struct iscsi_session *class_to_transport_session(struct iscsi_cls_session *);
extern void iscsi_start_session_recovery(struct iscsi_session *,
struct iscsi_conn *, int);
extern void iscsi_session_recovery_timedout(struct iscsi_cls_session *);
#define session_to_cls(_sess) \

查看文件

@@ -173,6 +173,8 @@ struct iscsi_cls_conn {
#define ISCSI_STATE_LOGGED_IN 2
#define ISCSI_STATE_FAILED 3
#define ISCSI_STATE_TERMINATE 4
#define ISCSI_STATE_IN_RECOVERY 5
#define ISCSI_STATE_RECOVERY_FAILED 6
struct iscsi_cls_session {
struct list_head sess_list; /* item in session_list */