Re: [PATCH 03/20] target: Make all control CDBs scatter-gather

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

 



On 07/08/2011 12:57 PM, Christoph Hellwig wrote:
>> @@ -4892,7 +4854,7 @@ int transport_generic_new_cmd(struct se_cmd *cmd)
>>  	 * cmd->t_mem_list of struct se_mem->se_page
>>  	 */
>>  	if (!(cmd->se_cmd_flags & SCF_PASSTHROUGH_SG_TO_MEM_NOALLOC)) {
>> -		ret = transport_allocate_resources(cmd);
>> +		ret = transport_generic_get_mem(cmd);
>>  		if (ret < 0)
>>  			return ret;
>>  	}
> 
> Before transport_allocate_resources used to be a no-op for
> SCF_SCSI_NON_DATA_CDB cdbs, which got lots with your patch.  Given that
> they should have a zero length your patch should be fine, but such
> subtilities would be nice to be documented in the changelog.

I'm just going to add a test to the conditional to only call get_mem if
cmd->data_length is nonzero, seems better.

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