Re: [PATCH] scsi_transport_fc: Make 'port_state' writeable

2013-04-12 Thread Chad Dupuis
Our testing of this patch has not shown any issues however I think we would be more comfortable with this change if there was a callback back into the LLDs that want to be notified of the rport state change so we can sync up our internal fibre channel port structures. AFAICT the changes required

Re: [PATCH] scsi_transport_fc: Make 'port_state' writeable

2013-04-05 Thread James Smart
I understand your points. But you will need to contact the different LLD maintainers to ensure receiving a devloss_tmo_callbk() on an rport they had not called fc_remote_port_delete() for. I know there's work on my side to validate it's ok. First glance was ok, but.. -- james s On

Re: [PATCH] scsi_transport_fc: Make 'port_state' writeable

2013-04-04 Thread Hannes Reinecke
On 04/01/2013 11:06 PM, James Smart wrote: On 3/18/2013 3:09 AM, Hannes Reinecke wrote: On 03/15/2013 08:13 PM, Bart Van Assche wrote: On 03/15/13 19:51, Mike Christie wrote: On 03/15/2013 08:41 AM, Bart Van Assche wrote: How about using the value of scsi_cmnd.jiffies_at_alloc to finish

Re: [PATCH] scsi_transport_fc: Make 'port_state' writeable

2013-04-01 Thread James Smart
Hannes, I'm finally going through this thread. I'm a bit uncomfortable about making the rport state writeable. The rport state is tightly tied to the driver's discovery engine, and I'm concerned about some of the callbacks firing, such as the rport_delete(), and the driver taking an action

Re: [PATCH] scsi_transport_fc: Make 'port_state' writeable

2013-03-18 Thread Hannes Reinecke
On 03/15/2013 08:13 PM, Bart Van Assche wrote: On 03/15/13 19:51, Mike Christie wrote: On 03/15/2013 08:41 AM, Bart Van Assche wrote: How about using the value of scsi_cmnd.jiffies_at_alloc to finish only those SCSI commands in the host reset handler that exceeded a certain processing time ?

Re: [PATCH] scsi_transport_fc: Make 'port_state' writeable

2013-03-18 Thread Jeremy Linton
On 3/15/2013 8:28 AM, Bryn M. Reeves wrote: On 03/15/2013 12:46 PM, Bart Van Assche wrote: The SCSI EH keeps trying until all outstanding request have been finished. Does lpfc_host_reset_handler() invoke scsi_done() for I don't think so (ends up calling lpfc_sli_cancel_iocbs() via

Re: [PATCH] scsi_transport_fc: Make 'port_state' writeable

2013-03-15 Thread Hannes Reinecke
On 03/14/2013 07:09 PM, Steffen Maier wrote: Just for my understanding: So this is a bit like writing 0 into the failed attribute of a zfcp_port in sysfs (zfcp_sysfs_port_failed_store()) which forces a port reopen recovery including a sequence of fc_remote_port_delete and fc_remote_port_add?

Re: [PATCH] scsi_transport_fc: Make 'port_state' writeable

2013-03-15 Thread Bryn M. Reeves
On 03/15/2013 11:55 AM, Hannes Reinecke wrote: Rationale for this patch is a weird test case with brocade switches; there you can actually disable a _target_ port. So the port isn't reachable anymore but no RSCN is send. I think it's more than a pure test-case; using the rscnsupr feature on

Re: [PATCH] scsi_transport_fc: Make 'port_state' writeable

2013-03-15 Thread Bart Van Assche
On 03/15/13 12:55, Hannes Reinecke wrote: And the LLDD is forced into error recovery which'll take _ages_ as each and every command send during error recovery will time out. Hello Hannes, I'm analyzing a related but not identical issue with SRP. It would help if you could tell with which

Re: [PATCH] scsi_transport_fc: Make 'port_state' writeable

2013-03-15 Thread Bryn M. Reeves
On 03/15/2013 12:24 PM, Bart Van Assche wrote: On 03/15/13 12:55, Hannes Reinecke wrote: And the LLDD is forced into error recovery which'll take _ages_ as each and every command send during error recovery will time out. Hello Hannes, I'm analyzing a related but not identical issue with SRP.

Re: [PATCH] scsi_transport_fc: Make 'port_state' writeable

2013-03-15 Thread Bart Van Assche
On 03/15/13 13:37, Bryn M. Reeves wrote: On 03/15/2013 12:24 PM, Bart Van Assche wrote: On 03/15/13 12:55, Hannes Reinecke wrote: And the LLDD is forced into error recovery which'll take _ages_ as each and every command send during error recovery will time out. Hello Hannes, I'm analyzing a

Re: [PATCH] scsi_transport_fc: Make 'port_state' writeable

2013-03-15 Thread Bryn M. Reeves
On 03/15/2013 12:46 PM, Bart Van Assche wrote: The SCSI EH keeps trying until all outstanding request have been finished. Does lpfc_host_reset_handler() invoke scsi_done() for I don't think so (ends up calling lpfc_sli_cancel_iocbs() via lpfc_hba_down_post() after shutting down the mailbox)

Re: [PATCH] scsi_transport_fc: Make 'port_state' writeable

2013-03-15 Thread Bart Van Assche
On 03/15/13 14:28, Bryn M. Reeves wrote: On 03/15/2013 12:46 PM, Bart Van Assche wrote: The SCSI EH keeps trying until all outstanding request have been finished. Does lpfc_host_reset_handler() invoke scsi_done() for I don't think so (ends up calling lpfc_sli_cancel_iocbs() via

Re: [PATCH] scsi_transport_fc: Make 'port_state' writeable

2013-03-15 Thread Mike Christie
On 03/15/2013 08:41 AM, Bart Van Assche wrote: On 03/15/13 14:28, Bryn M. Reeves wrote: On 03/15/2013 12:46 PM, Bart Van Assche wrote: The SCSI EH keeps trying until all outstanding request have been finished. Does lpfc_host_reset_handler() invoke scsi_done() for It does not really matter at

Re: [PATCH] scsi_transport_fc: Make 'port_state' writeable

2013-03-15 Thread Bart Van Assche
On 03/15/13 19:51, Mike Christie wrote: On 03/15/2013 08:41 AM, Bart Van Assche wrote: How about using the value of scsi_cmnd.jiffies_at_alloc to finish only those SCSI commands in the host reset handler that exceeded a certain processing time ? We basically do this now. When a scsi command

Re: [PATCH] scsi_transport_fc: Make 'port_state' writeable

2013-03-15 Thread Mike Christie
On 03/15/2013 02:13 PM, Bart Van Assche wrote: On 03/15/13 19:51, Mike Christie wrote: On 03/15/2013 08:41 AM, Bart Van Assche wrote: How about using the value of scsi_cmnd.jiffies_at_alloc to finish only those SCSI commands in the host reset handler that exceeded a certain processing time ?

Re: [PATCH] scsi_transport_fc: Make 'port_state' writeable

2013-03-14 Thread Steffen Maier
Just for my understanding: So this is a bit like writing 0 into the failed attribute of a zfcp_port in sysfs (zfcp_sysfs_port_failed_store()) which forces a port reopen recovery including a sequence of fc_remote_port_delete and fc_remote_port_add? If so, it sounds good to have this