Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752307Ab3HUGcZ (ORCPT ); Wed, 21 Aug 2013 02:32:25 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:42563 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752017Ab3HUGcY (ORCPT ); Wed, 21 Aug 2013 02:32:24 -0400 Date: Tue, 20 Aug 2013 23:32:23 -0700 From: Christoph Hellwig To: "Nicholas A. Bellinger" Cc: target-devel , lkml , linux-scsi , Christoph Hellwig , Hannes Reinecke , Martin Petersen , Chris Mason , James Bottomley , Nicholas Bellinger Subject: Re: [PATCH 5/9] target: Skip ->queue_data_in() callbacks for COMPARE_AND_WRITE 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 Content-Disposition: inline In-Reply-To: <1377029280-19144-6-git-send-email-nab@daterainc.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 634 Lines: 16 > @@ -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. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/