On Jun 22, 2010, at 11:12 AM, Mike Christie wrote: > On 06/21/2010 06:35 PM, Ravi Anand wrote: >> Mike, >> >> Actually, that's not true. >> > > I think you are misunderstanding me. > > >> When we call iscsi_block_session(), session is already down and we are not >> sending any NOP. >> > > I never said you were going to send a nop. I was saying that you guys > said the ka_timeout is used to detemine when to send a nop. > > You guys said: > <start> > It's time interval between connection keep-alive ping. When a connection > is idle for the connection keep-alive timeout interval, the ISP4xxx > sends an iSCSI NOP PDU to the other device that is part of the connection. > When the device responses to the NOP PDU, the connection remains open. > When the device fails to respond, the ISP4010 closes the connection > and informs the driver that the connection has gone down. > <end> > > so I was saying if the session is down, nops cannot be sent so > ka_timeout does not come into play at that time (it has already expired). > >> FW closes connection after ka_timeout expire at FW level. Then FW >> sends notification to driver for DDB state change which basically indicates >> that session is in failed state . After that driver mark device *missing* and call iscsi_block_sesstion(). >> At this point iSCSI connection is already closed, so FW is not sending >> any iSCSI NOP to target. > > Yeah, that is what I was saying. > >> >> We are just using value of ka_timeout in sess->recovery_tmo because >> we want to wait for some time for connection to comeback else >> mark device dead. > > I agree 100% that you should have a timer to wait for the session to > come back. libiscsi has the noop settings which is equivalent to your > ka_timeout and then for the recovery_tmo we have the > replacement/recovery_tmo setting. My point is that there is no > requirement and no good reason to set sess->recovery_tmo based on the > same setting. > > I am saying ka_timeout is not used for the same operations as > session->recovery_tmo. They handle two separate events, and should be > two separate settings. Once ka_timeout has expired we have marked the > session as down, and now we are on the recovery stage, so a new timer > comes into play. > > So ka_timeout is used to determine when we want to mark a session as bad. > > session->recovery_tmo is used to determine when we want give up on the > session. > > They should be 2 different settings since testing a SAN/port can take > different times than doing recovery of a session. Thanks for the clarification. What about if we provide a cmd line option for user's to fine tune if needed, with default value set. Sound's OK ? Anyway we will look into libiscsi code as well. Thanks ravi -- 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