Re: [PATCH 13/23] scsi_dh_alua: Use separate alua_port_group structure

2015-09-22 Thread Ewan Milne
On Thu, 2015-08-27 at 14:41 +0200, Hannes Reinecke wrote: > The port group needs to be a separate structure as several > LUNs might belong to the same group. > > Signed-off-by: Hannes Reinecke > --- > drivers/scsi/device_handler/scsi_dh_alua.c | 211 > +++-- > 1 file cha

Re: [PATCH 13/23] scsi_dh_alua: Use separate alua_port_group structure

2015-09-01 Thread Hannes Reinecke
On 09/01/2015 03:44 PM, Christoph Hellwig wrote: > On Tue, Sep 01, 2015 at 03:02:29PM +0200, Hannes Reinecke wrote: + rcu_read_lock(); + pg = rcu_dereference(h->pg); + if (!pg) { + rcu_read_unlock(); + return -ENXIO; + } >>> >>> What is this rcu_r

Re: [PATCH 13/23] scsi_dh_alua: Use separate alua_port_group structure

2015-09-01 Thread Christoph Hellwig
On Tue, Sep 01, 2015 at 03:02:29PM +0200, Hannes Reinecke wrote: > >> + rcu_read_lock(); > >> + pg = rcu_dereference(h->pg); > >> + if (!pg) { > >> + rcu_read_unlock(); > >> + return -ENXIO; > >> + } > > > > What is this rcu_read_lock supposed to protect against given > > tha

Re: [PATCH 13/23] scsi_dh_alua: Use separate alua_port_group structure

2015-09-01 Thread Hannes Reinecke
On 09/01/2015 12:20 PM, Christoph Hellwig wrote: >> +struct alua_dh_data { >> +struct alua_port_group *pg; >> +int rel_port; >> +int tpgs; > > The tpgs file doesn't make much sense in the new alua_dh_data > structure. Please return it explicitl

Re: [PATCH 13/23] scsi_dh_alua: Use separate alua_port_group structure

2015-09-01 Thread Christoph Hellwig
Ok, coming back to this path as it's the start of somethign building up over various patches: > + pg = kzalloc(sizeof(struct alua_port_group), GFP_KERNEL); > + if (!pg) { > + sdev_printk(KERN_WARNING, sdev, > + "%s: kzalloc port group failed\n", > +

Re: [PATCH 13/23] scsi_dh_alua: Use separate alua_port_group structure

2015-09-01 Thread Christoph Hellwig
> +struct alua_dh_data { > + struct alua_port_group *pg; > + int rel_port; > + int tpgs; The tpgs file doesn't make much sense in the new alua_dh_data structure. Please return it explicitly from alua_check_tpgs and assign it directly to the mem

[PATCH 13/23] scsi_dh_alua: Use separate alua_port_group structure

2015-08-27 Thread Hannes Reinecke
The port group needs to be a separate structure as several LUNs might belong to the same group. Signed-off-by: Hannes Reinecke --- drivers/scsi/device_handler/scsi_dh_alua.c | 211 +++-- 1 file changed, 139 insertions(+), 72 deletions(-) diff --git a/drivers/scsi/device_