Re: target_emulate_request_sense question

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

 



On Fri, 2012-05-11 at 11:00 -0400, Jörn Engel wrote:
> Hello Nick!
> 
> In target_emulate_request_sense, we set err to -EINVAL only to ignore
> the value and return 0 from the function.  The mindless mechanical
> part of my brain would like to just remove the err variable, but
> somehwo I cannot convince myself that we really should be ignoring it.
> 
> Do you remember the background of that code and what it intended to
> do?
> 

At one point the original se_cmd->execute_cmd() callback return value
where used to determine which type of SCSI exception + sense payload
needed to be generated..

Now this is done using proper cmd->scsi_sense_reason assignments
(TCM_INVALID_CDB_FIELD for target_emulate_request_sense failure for
example), and the ->execute_cmd() call in __transport_execute_tasks()
only checks for non zero status to determine when trigger the exception
via transport_generic_request_failure()

--nab


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


[Index of Archives]     [Linux SCSI]     [Kernel Newbies]     [Linux SCSI Target Infrastructure]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Device Mapper]

  Powered by Linux