Fedora Account System
Red Hat Associate
Red Hat Customer
To reproduce: Have a samba exported dfsroot with a referral and mount it: # mount /mnt/dfs # ls -l /mnt/dfs/dfs<tab> total 0 ...later attempts to readdir work. The tab completion somehow causes the mount not to trigger during lookup, so we end up getting the EREMOTE in the readdir codepath. Maybe the problem is that follow_link op isn't being triggered here? If so, then David's patches to change that upstream might help. cifsFYI output follows: ------------------[snip]------------------ fs/cifs/readdir.c: CIFS VFS: in cifs_readdir as Xid: 1723 with uid: 0 fs/cifs/readdir.c: Full path: \\dantu\dfsroot\dfslink start at: 2 fs/cifs/cifssmb.c: In FindFirst for \\dantu\dfsroot\dfslink fs/cifs/transport.c: For smb_command 50 fs/cifs/transport.c: Sending smb: total_len 134 fs/cifs/connect.c: rfc1002 length 0x27 fs/cifs/connect.c: invalid transact2 word count Status code returned 0xc0000257 NT_STATUS_PATH_NOT_COVERED fs/cifs/netmisc.c: Mapping smb error code 3 to POSIX err -66 fs/cifs/cifssmb.c: Error in FindFirst = -66 fs/cifs/readdir.c: initiate cifs search rc -66 fs/cifs/readdir.c: CIFS VFS: leaving cifs_readdir (xid = 1723) rc = -66 fs/cifs/readdir.c: CIFS VFS: in cifs_readdir as Xid: 1724 with uid: 0 fs/cifs/readdir.c: calling findnext2 fs/cifs/cifssmb.c: In FindNext fs/cifs/transport.c: For smb_command 50 fs/cifs/transport.c: Sending smb: total_len 84 fs/cifs/connect.c: rfc1002 length 0x27 fs/cifs/connect.c: invalid transact2 word count Status code returned 0x80000006 NT_STATUS_IN_PAGE_ERROR fs/cifs/netmisc.c: Mapping smb error code 31 to POSIX err -5 fs/cifs/cifssmb.c: FindNext returned = -5 fs/cifs/readdir.c: fce error -2 fs/cifs/readdir.c: CIFS VFS: leaving cifs_readdir (xid = 1724) rc = -2 fs/cifs/file.c: Closedir inode = 0xffff880021ad0568 fs/cifs/file.c: CIFS VFS: in cifs_closedir as Xid: 1725 with uid: 0 fs/cifs/file.c: Freeing private data in close dir fs/cifs/file.c: CIFS VFS: leaving cifs_closedir (xid = 1725) rc = 0
This bug appears to have been reported against 'rawhide' during the Fedora 14 development cycle. Changing version to '14'. More information and reason for this action is here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping
I think the problem is that there is not a clear way to recognize a DFS referral in a FIND_* reply. Suresh J. was looking at this a while back, but I don't think he ever came up with a good solution.
This bug appears to have been reported against 'rawhide' during the Fedora 19 development cycle. Changing version to '19'. (As we did not run this process for some time, it could affect also pre-Fedora 19 development cycle bugs. We are very sorry. It will help us with cleanup during Fedora 19 End Of Life. Thank you.) More information and reason for this action is here: https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora19
Looks like we might finally have a fix for this going into mainline: http://article.gmane.org/gmane.linux.kernel.cifs/8490 It's not merged yet, but I expect that it will be in the next week or two.
The patch was merged for 3.11, so it should make that kernel. I'm going to go ahead and close this with a resolution of RAWHIDE. It's not in RAWHIDE yet, but will be once rawhide starts putting together 3.11-rc kernels. It may eventually make f19 as well once that release gets the 3.11 kernel.