Bug 9006 - Improve handling of network configuration switch (e.g. from eth to wifi)
Summary: Improve handling of network configuration switch (e.g. from eth to wifi)
Status: RESOLVED WONTFIX
Alias: None
Product: CifsVFS
Classification: Unclassified
Component: kernel fs (show other bugs)
Version: 2.6
Hardware: All All
: P5 normal
Target Milestone: ---
Assignee: Steve French
QA Contact: cifs QA contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-25 17:23 UTC by Daniel Hahler
Modified: 2020-08-13 15:17 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
Comment 1 Björn Jacke 2020-08-13 15:17:32 UTC
this is a generic TCP issue. Either SMB via MPTCP or QUIC might make such network transitions smoother in the future.