Re: [PATCH] target: pass sense_reason as a return value

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

 



On Tue, Oct 30, 2012 at 09:40:34AM -0700, Roland Dreier wrote:
> I don't think I love this change:
> 
>  - How do we fit in commands that might need to return more sense data?
>    (eg COMPARE AND WRITE wants to put the miscompare offset in
>    the sense data)

The same way we handle pre-computed sense data now - stuff it into the
sense buffer early and then set a flag that sense data already exist.

Right now this is only done via SCF_TRANSPORT_TASK_SENSE for pscsi, but
I already have a WIP series to cleanup and generalize that area.

>  - I have a vague plan of handling commands that generate underrun by
>    returning the length from the command handler, which this breaks.
> 
>    (Right now for example if someone passes an allocation length of 255
>    to INQUIRY, we return 255 bytes instead of returning the actual length
>    of our inquiry data + underrun for the rest of the buffer, which is the
>    wrong behavior)

I'd rather have an explicit field for the underrun length in the se_cmd.

This follows the model of returning the most important information
(error code or equivalent) as the return value, and store additional
information only needed for the minority of the cases out of line.
--
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