Fix task management functions status: task not found is not an error,
while not implemented function is.
This commit is contained in:
parent
0ea64e38ac
commit
fdfc6c8ebd
@ -11944,7 +11944,7 @@ ctl_abort_task(union ctl_io *io)
|
|||||||
lun = ctl_softc->ctl_luns[targ_lun];
|
lun = ctl_softc->ctl_luns[targ_lun];
|
||||||
else {
|
else {
|
||||||
mtx_unlock(&ctl_softc->ctl_lock);
|
mtx_unlock(&ctl_softc->ctl_lock);
|
||||||
goto bailout;
|
return (1);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
@ -12047,8 +12047,6 @@ ctl_abort_task(union ctl_io *io)
|
|||||||
}
|
}
|
||||||
mtx_unlock(&lun->lun_lock);
|
mtx_unlock(&lun->lun_lock);
|
||||||
|
|
||||||
bailout:
|
|
||||||
|
|
||||||
if (found == 0) {
|
if (found == 0) {
|
||||||
/*
|
/*
|
||||||
* This isn't really an error. It's entirely possible for
|
* This isn't really an error. It's entirely possible for
|
||||||
@ -12064,8 +12062,7 @@ bailout:
|
|||||||
io->io_hdr.nexus.targ_lun, io->taskio.tag_num,
|
io->io_hdr.nexus.targ_lun, io->taskio.tag_num,
|
||||||
io->taskio.tag_type);
|
io->taskio.tag_type);
|
||||||
#endif
|
#endif
|
||||||
return (1);
|
}
|
||||||
} else
|
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -12076,15 +12073,12 @@ bailout:
|
|||||||
static void
|
static void
|
||||||
ctl_run_task(union ctl_io *io)
|
ctl_run_task(union ctl_io *io)
|
||||||
{
|
{
|
||||||
struct ctl_softc *ctl_softc;
|
struct ctl_softc *ctl_softc = control_softc;
|
||||||
int retval;
|
int retval = 1;
|
||||||
const char *task_desc;
|
const char *task_desc;
|
||||||
|
|
||||||
CTL_DEBUG_PRINT(("ctl_run_task\n"));
|
CTL_DEBUG_PRINT(("ctl_run_task\n"));
|
||||||
|
|
||||||
ctl_softc = control_softc;
|
|
||||||
retval = 0;
|
|
||||||
|
|
||||||
KASSERT(io->io_hdr.io_type == CTL_IO_TASK,
|
KASSERT(io->io_hdr.io_type == CTL_IO_TASK,
|
||||||
("ctl_run_task: Unextected io_type %d\n",
|
("ctl_run_task: Unextected io_type %d\n",
|
||||||
io->io_hdr.io_type));
|
io->io_hdr.io_type));
|
||||||
@ -12133,7 +12127,6 @@ ctl_run_task(union ctl_io *io)
|
|||||||
case CTL_TASK_LUN_RESET: {
|
case CTL_TASK_LUN_RESET: {
|
||||||
struct ctl_lun *lun;
|
struct ctl_lun *lun;
|
||||||
uint32_t targ_lun;
|
uint32_t targ_lun;
|
||||||
int retval;
|
|
||||||
|
|
||||||
targ_lun = io->io_hdr.nexus.targ_mapped_lun;
|
targ_lun = io->io_hdr.nexus.targ_mapped_lun;
|
||||||
mtx_lock(&ctl_softc->ctl_lock);
|
mtx_lock(&ctl_softc->ctl_lock);
|
||||||
@ -12190,12 +12183,6 @@ ctl_run_task(union ctl_io *io)
|
|||||||
io->io_hdr.status = CTL_SUCCESS;
|
io->io_hdr.status = CTL_SUCCESS;
|
||||||
else
|
else
|
||||||
io->io_hdr.status = CTL_ERROR;
|
io->io_hdr.status = CTL_ERROR;
|
||||||
|
|
||||||
/*
|
|
||||||
* This will queue this I/O to the done queue, but the
|
|
||||||
* work thread won't be able to process it until we
|
|
||||||
* return and the lock is released.
|
|
||||||
*/
|
|
||||||
ctl_done(io);
|
ctl_done(io);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user