Page MenuHomeFreeBSD

D12653.diff
No OneTemporary

D12653.diff

Index: head/sys/dev/iscsi/iscsi.c
===================================================================
--- head/sys/dev/iscsi/iscsi.c
+++ head/sys/dev/iscsi/iscsi.c
@@ -291,17 +291,14 @@
static void
iscsi_session_terminate_task(struct iscsi_session *is,
- struct iscsi_outstanding *io, bool requeue)
+ struct iscsi_outstanding *io, cam_status status)
{
ISCSI_SESSION_LOCK_ASSERT(is);
if (io->io_ccb != NULL) {
io->io_ccb->ccb_h.status &= ~(CAM_SIM_QUEUED | CAM_STATUS_MASK);
- if (requeue)
- io->io_ccb->ccb_h.status |= CAM_REQUEUE_REQ;
- else
- io->io_ccb->ccb_h.status |= CAM_REQ_ABORTED;
+ io->io_ccb->ccb_h.status |= status;
if ((io->io_ccb->ccb_h.status & CAM_DEV_QFRZN) == 0) {
io->io_ccb->ccb_h.status |= CAM_DEV_QFRZN;
xpt_freeze_devq(io->io_ccb->ccb_h.path, 1);
@@ -313,14 +310,14 @@
}
static void
-iscsi_session_terminate_tasks(struct iscsi_session *is, bool requeue)
+iscsi_session_terminate_tasks(struct iscsi_session *is, cam_status status)
{
struct iscsi_outstanding *io, *tmp;
ISCSI_SESSION_LOCK_ASSERT(is);
TAILQ_FOREACH_SAFE(io, &is->is_outstanding, io_next, tmp) {
- iscsi_session_terminate_task(is, io, requeue);
+ iscsi_session_terminate_task(is, io, status);
}
}
@@ -354,11 +351,11 @@
/*
* Terminate SCSI tasks, asking CAM to requeue them.
*/
- iscsi_session_terminate_tasks(is, true);
+ iscsi_session_terminate_tasks(is, CAM_REQUEUE_REQ);
return;
}
- iscsi_session_terminate_tasks(is, false);
+ iscsi_session_terminate_tasks(is, CAM_DEV_NOT_THERE);
if (is->is_sim == NULL)
return;
@@ -1021,7 +1018,7 @@
} else {
aio = iscsi_outstanding_find(is, io->io_datasn);
if (aio != NULL && aio->io_ccb != NULL)
- iscsi_session_terminate_task(is, aio, false);
+ iscsi_session_terminate_task(is, aio, CAM_REQ_ABORTED);
}
iscsi_outstanding_remove(is, io);

File Metadata

Mime Type
text/plain
Expires
Fri, Jan 24, 5:27 PM (16 h, 34 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16093677
Default Alt Text
D12653.diff (1 KB)

Event Timeline