Re: [PATCH] [SCSI] Make scsi_transfer_length take a scsi_data_buffer argument

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

 



On 8/6/2014 3:12 PM, Sagi Grimberg wrote:

<SNIP>
diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c
index f2db82beb646..fdea8c1527d4 100644
--- a/drivers/scsi/libiscsi.c
+++ b/drivers/scsi/libiscsi.c
@@ -391,7 +391,7 @@ static int iscsi_prep_scsi_cmd_pdu(struct
iscsi_task *task)
      if (scsi_get_prot_op(sc) != SCSI_PROT_NORMAL)
          task->protected = true;

-    transfer_length = scsi_transfer_length(sc);
+    transfer_length = scsi_transfer_length(sc, scsi_out(sc));

If we go down this road we should return to the in_len/out_len
approach that was used before since taking scsi_out(sc) doesn't make
sense for READs (although it would work).


On second thought, since the transfer length is always the
command scsi data buffer length, why not keep it as is and
if at any point in the future DIF will co-exist with bidi,
we can add scsi_bidi_transfer_length which will calculate
the bidi in length.

In this case, an iSCSI bidi transaction will do:
hdr->data_length = scsi_transfer_legnth(sg);
rlen_ahdr->read_length = scsi_bidi_transfer_length(sc);



Sagi.
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux