lkml.org 
[lkml]   [2013]   [Aug]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 9/9] tcm_qla2xxx: Add special case for COMPARE_AND_WRITE data_direction
From
Date
On Wed, 2013-08-21 at 08:53 -0700, Christoph Hellwig wrote:
> On Wed, Aug 21, 2013 at 07:38:21AM -0700, Roland Dreier wrote:
> > I don't understand this. In fact the whole patch series looks quite
> > confused. COMPARE AND WRITE is a normal Data-Out command, with no
> > requirement for special bidirectional handling or anything like that.
> > The only slightly unusual thing is that a CAW command with a NUMBER OF
> > LOGICAL BLOCKS equal to N will actually transfer 2*N worth of data --
> > one set of data for the compare operation and a second set to write if
> > the compare succeeds. But just to be clear, the transfer of those 2*N
> > blocks happens as a single transfer during the Data-Out phase.
>
> I think the confusion is that the implementation of COMPARE AND WRITE
> obviously requires a read and a write phase, and the implementation
> tries to mix this up with an actual bidirectional scsi command.
>
> If the core stopped keying off t_bidi_data_sg and used better flag
> this could be easily solved.

Good point here as well.. Changing these cases to check for SCF_BIDI
instead, and adding a extra SCF_COMPARE_AND_WRITE check for the case in
transport_generic_new_cmd() to call transport_generic_get_mem_bidi().

--nab



\
 
 \ /
  Last update: 2013-08-21 20:01    [W:0.135 / U:0.160 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site