Red Hat Bugzilla – Bug 305231
Cannot mount a CIFS share from W2K server until other share touched
Last modified: 2014-06-18 03:36:45 EDT
Description of problem:
Assume we have a W2K server exporting a number of shares.
If we mount one of then and wait long enough, it becomes
cat /proc/fs/cifs/DebugData shows.
Then, if we try to mount a different share exported from the same server,
mount fails, until the already mounted share is accessed (e.g. df or ls)
Version-Release number of selected component (if applicable):
kernel 18.104.22.168-49.fc6, CIFS Version 1.49,
util-linux-2.13-0.48.fc6.i386 (for mount)
samba-client-3.0.24-7.fc6.i386 (for mount.cifs)
Steps to Reproduce:
1. have a W2K server srv with share share1, share2,
local dirs /mnt/cifs1, /mnt/cifs2
2. mount one share \\srv\share1 as /mnt/cifs1
and wait until share1 is in DISCONNECTED state
4. Try to mount \\srv\share2 as /mnt/cifs2
5. run df /mnt/cifs1
6. repeat mount command as in 4.
mount error 11 = Resource temporarily unavailable
should mount without the need to access the other share
tcpdump indicates no attempts to connect to the server in step 4.
Thanks for the report. I've been able to replicate this on very recent kernels
as well. I'll have a look and see what can be done to fix it.
The problem seems to be confined to the situation where SMB sessions are shared.
If you mount with different creds, then the old share stays in DISCONNECTED
state, and the mount works. It's only when mounting in such a way that the SMB
session is shared that there's a problem.
Created attachment 290173 [details]
patch -- redo existing session setup if needed in cifs_mount
This patch seems to fix it for me. If you're able to test this out, could you
do so and verify the fix? I'll plan to send this upstream in the near future.
Patch sent upstream to linux-cifs-client mailing list.
Fix has been taken upstream. Closing as UPSTREAM.