Bug 9006 - Improve handling of network configuration switch (e.g. from eth to wifi)
Improve handling of network configuration switch (e.g. from eth to wifi)
Status: NEW
Product: CifsVFS
Classification: Unclassified
Component: kernel fs
2.6
All All
: P5 normal
: ---
Assigned To: Steve French
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-25 17:23 UTC by Daniel Hahler
Modified: 2012-06-25 17:23 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Hahler 2012-06-25 17:23:32 UTC
When switching from a wired network configuration to wifi, my cifs share hangs for 300 seconds, before CIFS VFS is reconnecting.
This happens every time when (un)docking the notebook.

While this action changes the client's IP address and the routing table, the server itself is still reachable (via ping/ssh etc).

It appears as if the cifs module is using a static route to the server when mounting, and therefore cannot reach the server anymore.

Would it be possible to handle this case (network switch / undocking a notebook) better?

After having found a post on the mailing list [1], I have set the echo_retries=1 option for cifs.ko and now the timeout is down to "only" 1 minute, which is much better already.

Would it be possible to tune the SMB_ECHO_INTERVAL from user land, e.g. by using a kernel module parameter?
Then setting this to 30 or 10 seconds might be a good enough workaround for me.

I have also tried re-mounting (mount -o remount) the share, but that did not trigger a re-connection either. This might also be a good workaround: via ifup/ifdown scripts any cifs shares could be remounted and trigger a re-connection to the server, if it is not reachable anymore.

1: http://www.mail-archive.com/linux-cifs@vger.kernel.org/msg06173.html