Re: [PATCH 10/17] scsi_dh_alua: Use separate alua_port_group structure

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

 



On 05/11/2015 02:32 PM, Christoph Hellwig wrote:
> On Mon, May 04, 2015 at 02:42:16PM +0200, Hannes Reinecke wrote:
>> The port group needs to be a separate structure as several
>> LUNs might belong to the same group.
> 
> The switch to on-stack sense data in alua_rtpg probably should be
> a separate patch.
> 
>> -static int realloc_buffer(struct alua_dh_data *h, unsigned len)
>> +static int realloc_buffer(struct alua_port_group *pg, unsigned len)
>>  {
> 
> Not directly related to this patch, but what's the reason to have
> a buffer hang off the dh_data or now port group?  Seems like a local
> allocation in alua_rtpg would be more sensible.
> 
Hmm. Okay, can do this.

>> +	spin_lock(&port_group_lock);
>> +	pg = kzalloc(sizeof(struct alua_port_group), GFP_ATOMIC);
>> +	if (!pg) {
>> +		sdev_printk(KERN_WARNING, sdev,
>> +			    "%s: kzalloc port group failed\n",
>> +			    ALUA_DH_NAME);
>> +		/* Temporary failure, bypass */
>> +		spin_unlock(&port_group_lock);
>> +		return SCSI_DH_DEV_TEMP_BUSY;
>> +	}
> 
> As bart mentioned it should be simply enough to move the allocation
> and initialization outside the spinlock.  
> 
Yes, will be doing so. But I'm still waiting for a review for the
remaining bits before sending a new version.

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		               zSeries & Storage
hare@xxxxxxx			               +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)
--
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