From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: [PATCH 5/9] target: Skip ->queue_data_in() callbacks for COMPARE_AND_WRITE Date: Tue, 20 Aug 2013 23:32:23 -0700 Message-ID: <20130821063223.GG25506@infradead.org> References: <1377029280-19144-1-git-send-email-nab@daterainc.com> <1377029280-19144-6-git-send-email-nab@daterainc.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <1377029280-19144-6-git-send-email-nab@daterainc.com> Sender: linux-kernel-owner@vger.kernel.org To: "Nicholas A. Bellinger" Cc: target-devel , lkml , linux-scsi , Christoph Hellwig , Hannes Reinecke , Martin Petersen , Chris Mason , James Bottomley , Nicholas Bellinger List-Id: linux-scsi@vger.kernel.org > @@ -1832,7 +1832,8 @@ static void transport_complete_qf(struct se_cmd *cmd) > ret = cmd->se_tfo->queue_data_in(cmd); > break; > case DMA_TO_DEVICE: > - if (cmd->t_bidi_data_sg) { > + if (cmd->t_bidi_data_sg && > + cmd->t_task_cdb[0] != COMPARE_AND_WRITE) { This is not the place to hardcode specific cdb opcodes. Should be a flag with a defined meaning on the command.