SG_SCSI_RESET ioctl reset escalation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Currently, if you request a reset through ioctl and it fails,
the kernel escalates like it does for scsi_abort_eh_cmnd:
	bus device reset ->
		target reset ->
			bus reset ->
				host reset

This is from scsi_error.c scsi_ioctl_reset:

        switch (val) {
        case SG_SCSI_RESET_NOTHING:
                break;
        case SG_SCSI_RESET_DEVICE:
                rtn = scsi_try_bus_device_reset(scmd);
                if (rtn == SUCCESS)
                        break;
                /* FALLTHROUGH */
        case SG_SCSI_RESET_TARGET:
                rtn = scsi_try_target_reset(scmd);
                if (rtn == SUCCESS)
                        break;
                /* FALLTHROUGH */
        case SG_SCSI_RESET_BUS:
                rtn = scsi_try_bus_reset(scmd);
                if (rtn == SUCCESS)
                        break;
                /* FALLTHROUGH */
        case SG_SCSI_RESET_HOST:
                rtn = scsi_try_host_reset(scmd);
                if (rtn == SUCCESS)
                        break;
        default:
                /* FALLTHROUGH */
                error = -EIO;
                break;
        }

Those stronger reset levels affect multiple devices,
which may or may not be desired.

sg-reset includes a --no-esc option to ask the kernel
to not escalate resets, based on a February 2013 thread,
but the matching kernel changes were never merged.

Original issue:
http://marc.info/?l=linux-scsi&m=136000904311597&w=2

Suggested fix:
http://marc.info/?l=linux-scsi&m=136095718729372&w=2

Could that fix be revived?

---
Rob Elliott    HP Server Storage


--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux