Re: [PATCH 05/10] sd: don't use scsi_setup_blk_pc_cmnd for write same requests

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

 



>> -	rq->__data_len = sdp->sector_size;

>> +	rq->__data_len = sdp->sector_size;
>> +	ret = scsi_init_io(cmd, GFP_ATOMIC);
>> +	rq->__data_len = nr_bytes;
>>   	return ret;
>>   }
>>
> Hmm? __data_len is the amount of data written _on the target_.
> Do we actually care about it?
> And if so, why didn't it break with the original version?
> In either case a short description in the patch would be nice.

The drivers care about it, and scsi_init_io uses it as transfer size,
thus we have to set it to the tranfer length before the scsi_init_io
call, and to the full number of bytes to be written after it.

We already do this before the patch, I just moved the first assginment
next to the call to scsi_init_io so that it's more obvious.

--
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