Mike, I'd prefer a fix on top of the core-for-3.16 branch in my
scsi-queue tree, which already has the fix from Martin.
I also really don't like these three confusing helpers:
> +static inline unsigned scsi_transfer_length(struct scsi_cmnd *scmd)
> +{
> + return __scsi_calculate_transfer_length(scmd,
> + blk_rq_bytes(scmd->request));
> +}
So here we use blk_rq_bytes still, which is incorrect for WRITE SAME.
> +static inline unsigned scsi_in_transfer_length(struct scsi_cmnd *scmd)
> +{
> + return __scsi_calculate_transfer_length(scmd, scsi_in(scmd)->length);
> +}
> +
> +static inline unsigned scsi_out_transfer_length(struct scsi_cmnd *scmd)
> +{
> + return __scsi_calculate_transfer_length(scmd, scsi_out(scmd)->length);
And here we use the in/out length. And no documentation whatsover which
one you'd want to choose.
I think the easiest fix is to just pass a scsi_data_buffer to
scsi_transfer_length(), and let the caller use scsi_in/scsi_out to find
the right one.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html