cifs: improve handling of network configuration switch (e.g. from eth to wifi)

Bug #1017622 reported by Daniel Hahler
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)

Bug Description

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://<email address hidden>/msg06173.html

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: linux-image-3.2.0-26-generic 3.2.0-26.41
ProcVersionSignature: Ubuntu 3.2.0-26.41-generic 3.2.19
Uname: Linux 3.2.0-26-generic x86_64
AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.24.
ApportVersion: 2.0.1-0ubuntu10
Architecture: amd64
 **** List of CAPTURE Hardware Devices ****
 card 0: PCH [HDA Intel PCH], device 0: CONEXANT Analog [CONEXANT Analog]
   Subdevices: 1/1
   Subdevice #0: subdevice #0
 /dev/snd/controlC0: daniel 4488 F.... pulseaudio
 /dev/snd/pcmC0D0p: daniel 4488 F...m pulseaudio
CRDA: Error: [Errno 2] No such file or directory
 Card hw:0 'PCH'/'HDA Intel PCH at 0xf2520000 irq 47'
   Mixer name : 'Intel CougarPoint HDMI'
   Components : 'HDA:14f1506e,17aa21db,00100000 HDA:80862805,80860101,00100000'
   Controls : 26
   Simple ctrls : 8
 Card hw:29 'ThinkPadEC'/'ThinkPad Console Audio Control at EC reg 0x30, fw unknown'
   Mixer name : 'ThinkPad EC (unknown)'
   Components : ''
   Controls : 1
   Simple ctrls : 1
 Simple mixer control 'Console',0
   Capabilities: pswitch pswitch-joined penum
   Playback channels: Mono
   Mono: Playback [on]
Date: Mon Jun 25 19:58:14 2012
HibernationDevice: RESUME=UUID=c06da6a2-76e0-4b5d-a4b0-f346c56d7537
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Release amd64 (20120425)
MachineType: LENOVO 42992PG
ProcFB: 0 inteldrmfb
ProcKernelCmdLine: BOOT_IMAGE=/vmlinuz-3.2.0-26-generic root=/dev/mapper/vg0-rootlv ro rootflags=subvol=@ quiet splash vt.handoff=7
 linux-restricted-modules-3.2.0-26-generic N/A
 linux-backports-modules-3.2.0-26-generic N/A
 linux-firmware 1.79
SourcePackage: linux
StagingDrivers: mei
UpgradeStatus: No upgrade log present (probably fresh install) 04/25/2012
dmi.bios.vendor: LENOVO
dmi.bios.version: 8DET61WW (1.31 )
dmi.board.asset.tag: Not Available 42992PG
dmi.board.vendor: LENOVO
dmi.board.version: Not Available
dmi.chassis.asset.tag: No Asset Information
dmi.chassis.type: 10
dmi.chassis.vendor: LENOVO
dmi.chassis.version: Not Available
dmi.modalias: dmi:bvnLENOVO:bvr8DET61WW(1.31):bd04/25/2012:svnLENOVO:pn42992PG:pvrThinkPadX220Tablet:rvnLENOVO:rn42992PG:rvrNotAvailable:cvnLENOVO:ct10:cvrNotAvailable: 42992PG
dmi.product.version: ThinkPad X220 Tablet
dmi.sys.vendor: LENOVO

Revision history for this message
Daniel Hahler (blueyed) wrote :
Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

Would it be possible for you to test the latest upstream kernel? Refer to . Please test the latest v3.5kernel[0] (Not a kernel in the daily directory) and install both the linux-image and linux-image-extra .deb packages.

Once you've tested the upstream kernel, please remove the 'needs-upstream-testing' tag(Only that one tag, please leave the other tags). This can be done by clicking on the yellow pencil icon next to the tag located at the bottom of the bug description and deleting the 'needs-upstream-testing' text.

If this bug is fixed in the mainline kernel, please add the following tag 'kernel-fixed-upstream'.

If the mainline kernel does not fix this bug, please add the tag: 'kernel-bug-exists-upstream'.

If you are unable to test the mainline kernel, for example it will not boot, please add the tag: 'kernel-unable-to-test-upstream'.
Once testing of the upstream kernel is complete, please mark this bug as "Confirmed".

Thanks in advance.


Changed in linux (Ubuntu):
importance: Undecided → Medium
status: New → Incomplete
tags: added: needs-upstream-testing
Chris J Arges (arges)
Changed in linux (Ubuntu):
assignee: nobody → Chris J Arges (christopherarges)
status: Incomplete → In Progress
tags: removed: needs-upstream-testing
Revision history for this message
Chris J Arges (arges) wrote :
Changed in linux:
importance: Unknown → Medium
status: Unknown → Confirmed
Dave Chiluk (chiluk)
Changed in linux (Ubuntu):
assignee: Chris J Arges (arges) → Dave Chiluk (chiluk)
Dave Chiluk (chiluk)
Changed in linux (Ubuntu):
assignee: Dave Chiluk (chiluk) → nobody
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.