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 , 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.
this is a generic TCP issue. Either SMB via MPTCP or QUIC might make such network transitions smoother in the future.