[linux-cifs-client] Timeout when writing to disconnected drive

Stefan Windfeldt Stefan.Windfeldt at axis.com
Thu Aug 27 12:23:25 MDT 2009


Hi!
I'm using the CIFS driver to store information on a NAS from some software we have written. And when the NAS is disconnected we would change and start to save the information on another NAS.
When I look at the code the driver has a 15 second timeout waiting for a response for the request and after this it has a 10 second wait while it tries to reconnect to the server. So if my software is writing data to the drive it will take a minimum of 25 seconds before it will get an error if the drive is disconnected.
Since this is a bit to long I have tried to find out if there is a faster way to detect if the NAS is disconnected using the driver. All I have found so far is this discussion from 2006:
http://lists.samba.org/archive/linux-cifs-client/2006-March/001215.html
Basically it lists three options on how the driver could detect that the server has been disconnected faster:
1. Polling the server with SMB echo
2. Fix the "hard" vs. "soft" mount option for cifs to be recognized in more places in the code.
3. Allow the timeouts to be configurable
(My short summary, has a lot more information if you are interested)

As far as I can see this hasn't been implemented in the driver and there has been no more discussion about these changes. I am wondering if there is any thought of having support for this in the future?

/Stefan Windfeldt


More information about the linux-cifs-client mailing list