Bug 305231

Summary: Cannot mount a CIFS share from W2K server until other share touched
Product: [Fedora] Fedora Reporter: Wojciech Pilorz <wpilorz>
Component: kernelAssignee: Jeff Layton <jlayton>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: 6CC: steved
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-01-15 11:29:14 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
patch -- redo existing session setup if needed in cifs_mount none

Description Wojciech Pilorz 2007-09-25 14:59:01 UTC
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
DISCONNECTED, as 
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 2.6.22.5-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)

How reproducible:
always

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
3. run 
  cat /proc/fs/cifs/DebugData
   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.

Actual results:
from 4.
mount error 11 = Resource temporarily unavailable
form 
Expected results:
should mount without the need to access the other share


Additional info:
tcpdump indicates no attempts to connect to the server in step 4.

Comment 1 Jeff Layton 2007-12-20 13:05:57 UTC
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.


Comment 2 Jeff Layton 2007-12-20 13:19:45 UTC
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.


Comment 3 Jeff Layton 2007-12-20 17:31:43 UTC
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.

Comment 4 Jeff Layton 2007-12-21 19:46:12 UTC
Patch sent upstream to linux-cifs-client mailing list.


Comment 5 Jeff Layton 2008-01-15 11:29:14 UTC
Fix has been taken upstream. Closing as UPSTREAM.