Page MenuHomeFreeBSD

D33747.diff
No OneTemporary

D33747.diff

diff --git a/sys/cam/ctl/ctl_frontend_iscsi.h b/sys/cam/ctl/ctl_frontend_iscsi.h
--- a/sys/cam/ctl/ctl_frontend_iscsi.h
+++ b/sys/cam/ctl/ctl_frontend_iscsi.h
@@ -84,6 +84,7 @@
int cs_timeout;
struct cv cs_maintenance_cv;
bool cs_terminating;
+ bool cs_terminating_tasks;
bool cs_handoff_in_progress;
bool cs_tasks_aborted;
int cs_max_burst_length;
diff --git a/sys/cam/ctl/ctl_frontend_iscsi.c b/sys/cam/ctl/ctl_frontend_iscsi.c
--- a/sys/cam/ctl/ctl_frontend_iscsi.c
+++ b/sys/cam/ctl/ctl_frontend_iscsi.c
@@ -1155,6 +1155,7 @@
}
CFISCSI_SESSION_LOCK(cs);
+ cs->cs_terminating_tasks = true;
while ((cdw = TAILQ_FIRST(&cs->cs_waiting_for_data_out)) != NULL) {
TAILQ_REMOVE(&cs->cs_waiting_for_data_out, cdw, cdw_next);
CFISCSI_SESSION_UNLOCK(cs);
@@ -2783,8 +2784,12 @@
cdw->cdw_r2t_end = io->scsiio.ext_data_filled + r2t_len;
CFISCSI_SESSION_LOCK(cs);
- if (cs->cs_terminating) {
+ if (cs->cs_terminating_tasks) {
CFISCSI_SESSION_UNLOCK(cs);
+ KASSERT((io->io_hdr.flags & CTL_FLAG_ABORT) != 0,
+ ("%s: I/O request %p on termating session %p not aborted",
+ __func__, io, cs));
+ CFISCSI_SESSION_WARN(cs, "aborting data_wait for aborted I/O");
cfiscsi_data_wait_abort(cs, cdw, 44);
return;
}

File Metadata

Mime Type
text/plain
Expires
Thu, Dec 26, 10:34 PM (11 h, 25 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15608456
Default Alt Text
D33747.diff (1 KB)

Event Timeline