Re: [PATCH] target: Set additional sense length field in sense data

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

 



On Wed, 2012-01-04 at 18:17 -0800, Roland Dreier wrote:
> On Wed, Jan 4, 2012 at 4:54 PM, Roland Dreier <roland@xxxxxxxxxx> wrote:
> > After discussing this offline with a few people, I now realize we can't
> > just silently succeed, at least the way my previous patch for data
> > commands did.  (ie that patch is wrong, although better than crashing)
> >
> > The problem is that returning immediately like that bypasses the
> > sequencer, which means we incorrectly skip reservation checking,
> > returning unit attention, etc.
> 
> Never mind... I see that generic_new_cmd comes after the sequencer
> so this doesn't quite apply.
> 
> However I'm still a bit uncomfortable with adding special handling for
> REQUEST SENSE, scattering length checks all over the inquiry handling,
> having a separate buffer and copying in MODE SENSE and all the other
> ad hoc stuff there is... it would be much better if we could just handle the
> 0-length stuff uniformly for all the control CDBs.
> 

So while I don't have any objections with the points above, re-factoring
out the data phase from existing control cdb emulation code is going to
be easier said than done.  ;)

So that said, I'm still leaning toward first fixing the immediate bug
for 0-length handling with a special case for REQUEST_SENSE in
transport_generic_cmd_sequencer() for v3.3, and look at more heavy
lifting to unify 0-length handling in per CDB functions for the next
round..

I'm still catching up on items from the last weeks, but I'll have
something to address the immediate issue for tomorrow.

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