Re: [PATCH scsi] Short the path length of scsi_cmd_to_driver()

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

 



>>>>> "Li" == Li Zhong <zhong@xxxxxxxxxxxxxxxxxx> writes:

> @@ -845,8 +844,11 @@ static int scsi_send_eh_cmnd(struct scsi_cmnd *scmd, unsigned char *cmnd,
> 
> 	scsi_eh_restore_cmnd(scmd, &ses);
> 
>-	if (sdrv && sdrv->eh_action)
>-		rtn = sdrv->eh_action(scmd, cmnd, cmnd_size, rtn);
>+	if (scmd->request->cmd_type == REQ_TYPE_FS) {
>+		struct scsi_driver *sdrv = scsi_cmd_to_driver(scmd);
>+		if (sdrv->eh_action)
>+			rtn = sdrv->eh_action(scmd, cmnd, cmnd_size, rtn);
>+	}
> 
> 	return rtn;
> }

My only concern is whether our device lifetime rules guarantee that the
ULD is always attached when we service an error handling command?

-- 
Martin K. Petersen	Oracle Linux Engineering
--
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