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 8:07 AM, Christoph Hellwig <hch@xxxxxxxxxxxxx> wrote:
> Pass the sense reason as an explicit return value from the I/O submission
> path instead of storing it in struct se_cmd and using negative return
> values.  This cleans up a lot of the code pathes, and with the sparse
> annotations for the new sense_reason_t type allows for much better
> error checking.

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)

 - 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)

 - R.
--
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