Re: [PATCH] Save command pool address of Scsi_Host

2014-08-04 Thread Christoph Hellwig
On Mon, Aug 04, 2014 at 06:22:59AM +0200, Juergen Gross wrote: OTOH it would be possible to just delete .cmd_pool in the template when deleting the pool. I'll send a patch doing this and you can decide whether to take it or to use the other solution. I'm not sure which to prefer: the

Re: [PATCH] Save command pool address of Scsi_Host

2014-08-04 Thread Christoph Hellwig
On Sat, Aug 02, 2014 at 12:24:34AM +0400, James Bottomley wrote: Wait, that's not right at all. There looks to be a thinko in the command pool handling code. We have both a cmd_pool in the host structure and in the host template structure, but there's confusion about which one we're supposed

Re: [PATCH] Save command pool address of Scsi_Host

2014-08-04 Thread James Bottomley
On Mon, 2014-08-04 at 04:03 -0700, Christoph Hellwig wrote: On Mon, Aug 04, 2014 at 06:22:59AM +0200, Juergen Gross wrote: OTOH it would be possible to just delete .cmd_pool in the template when deleting the pool. I'll send a patch doing this and you can decide whether to take it or to use

Re: [PATCH] Save command pool address of Scsi_Host

2014-08-03 Thread Juergen Gross
On 08/01/2014 10:24 PM, James Bottomley wrote: On Fri, 2014-08-01 at 05:03 -0700, Christoph Hellwig wrote: On Fri, Aug 01, 2014 at 08:27:05AM +0200, jgr...@suse.com wrote: From: Juergen Gross jgr...@suse.com If a scsi host driver specifies .cmd_len in it's scsi_host_template, a driver's

[PATCH] Save command pool address of Scsi_Host

2014-08-01 Thread jgross
From: Juergen Gross jgr...@suse.com If a scsi host driver specifies .cmd_len in it's scsi_host_template, a driver's private command pool is needed. scsi_find_host_cmd_pool() will locate it, but scsi_alloc_host_cmd_pool() isn't saving the pool address in the host template. This will result in an

Re: [PATCH] Save command pool address of Scsi_Host

2014-08-01 Thread Christoph Hellwig
On Fri, Aug 01, 2014 at 08:27:05AM +0200, jgr...@suse.com wrote: From: Juergen Gross jgr...@suse.com If a scsi host driver specifies .cmd_len in it's scsi_host_template, a driver's private command pool is needed. scsi_find_host_cmd_pool() will locate it, but scsi_alloc_host_cmd_pool()

[V2 PATCH] Save command pool address of Scsi_Host

2014-08-01 Thread jgross
From: Juergen Gross jgr...@suse.com If a scsi host driver specifies .cmd_len in it's scsi_host_template, a driver's private command pool is needed. scsi_find_host_cmd_pool() will locate it, but scsi_alloc_host_cmd_pool() isn't saving the pool address in the host template. This will result in an

Re: [PATCH] Save command pool address of Scsi_Host

2014-08-01 Thread James Bottomley
On Fri, 2014-08-01 at 05:03 -0700, Christoph Hellwig wrote: On Fri, Aug 01, 2014 at 08:27:05AM +0200, jgr...@suse.com wrote: From: Juergen Gross jgr...@suse.com If a scsi host driver specifies .cmd_len in it's scsi_host_template, a driver's private command pool is needed.