Re: [openib-general] SRP: [PATCH] Releasing the scsi_host when unloading

2006-05-23 Thread Roland Dreier
Ishai> As I told you before, your patch looks correct. Are you Ishai> going to apply it? Sorry, I committed it to git but forgot to check it into svn. (One more reason to stop maintaining kernel drivers in svn) - R. ___ openib-general mailing

Re: [openib-general] SRP: [PATCH] Releasing the scsi_host when unloading

2006-05-23 Thread Ishai Rabinovitz
On Wed, May 17, 2006 at 02:55:57AM +0300, Roland Dreier wrote: > > + /* > > + * We need 2 scsi_host_put becuase there are two get: > > + * in scsi_host_alloc and in scsi_add_host > > + */ > > + scsi_host_p

Re: [openib-general] SRP: [PATCH] Releasing the scsi_host when unloading

2006-05-17 Thread Ishai Rabinovitz
On Wed, May 17, 2006 at 02:55:57AM +0300, Roland Dreier wrote: > Hmm, this doesn't seem right to me. If I try this, then I get a crash > because the scsi_host is already gone after the first put. I verified > that the reference count is 1 before these puts, and with the > unmodified module I don'

Re: [openib-general] SRP: [PATCH] Releasing the scsi_host when unloading

2006-05-17 Thread Ishai Rabinovitz
On Wed, May 17, 2006 at 02:56:58AM +0300, Roland Dreier wrote: > BTW, I think the patch below is correct as well. This avoids problems > where the SRP driver waits forever for a completion, for example if > sending the DREQ fails because the connection has already been > disconnected by the target

Re: [openib-general] SRP: [PATCH] Releasing the scsi_host when unloading

2006-05-16 Thread Roland Dreier
BTW, I think the patch below is correct as well. This avoids problems where the SRP driver waits forever for a completion, for example if sending the DREQ fails because the connection has already been disconnected by the target. Does this scenario seem like the deadlock you thought you saw? ---

Re: [openib-general] SRP: [PATCH] Releasing the scsi_host when unloading

2006-05-16 Thread Roland Dreier
> +/* > + * We need 2 scsi_host_put becuase there are two get: > + * in scsi_host_alloc and in scsi_add_host > + */ > +scsi_host_put(target->scsi_host); > scsi_host_put(ta

Re: [openib-general] SRP: [PATCH] Releasing the scsi_host when unloading

2006-05-14 Thread Ishai Rabinovitz
On Sun, May 14, 2006 at 02:02:01PM +0300, Ishai Rabinovitz wrote: > Hi, > > After loading ib_srp module, adding a target and then unloading the ib_srp > target the scsi_host directory in /sys/class/scsi_host/ still exists. > It looks like the srp code does not release the scsi_host it had allocat

[openib-general] SRP: [PATCH] Releasing the scsi_host when unloading

2006-05-14 Thread Ishai Rabinovitz
Hi, After loading ib_srp module, adding a target and then unloading the ib_srp target the scsi_host directory in /sys/class/scsi_host/ still exists. It looks like the srp code does not release the scsi_host it had allocated. After examining the code I found out that when executing srp_remove_wor