Bug 199203 - kernel: CIFS VFS: ioctl error in smb2_get_dfs_refer rc=-5
Summary: kernel: CIFS VFS: ioctl error in smb2_get_dfs_refer rc=-5
Status: RESOLVED CODE_FIX
Alias: None
Product: File System
Classification: Unclassified
Component: CIFS (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: fs_cifs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-03-25 13:44 UTC by thomas.schwark
Modified: 2018-04-04 08:22 UTC (History)
1 user (show)

See Also:
Kernel Version: 4.15.13
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description thomas.schwark 2018-03-25 13:44:20 UTC
When mounting a samba share with the following command

mount -t cifs -o username=backupuser,password="$NAS_SMB_PASSWORD",iocharset=utf8 "//"$NAS_IP"/"$BACKUP""$BACKUPNR"" "$NASMOUNTPOINT"

the connection is established but produces the following error in the error logs:

kernel: CIFS VFS: ioctl error in smb2_get_dfs_refer rc=-5

The mounting client is an up-to-date archlinux system with kernel 4.15.13 (same problem with 4.16-rc6 mainline). The samba server is a qnap NAS with samba 4.4.16 and default config.

The error started occuring with a kernel update in the past (I´m sorry I don`t know which version exactly, but must be a while ago) and as we are doing a backup with the command above I get an email with this error every night since then.

The only workaround I found until now is using vers=1.0 like this:

mount -t cifs -o username=backupuser,password="$NAS_SMB_PASSWORD",iocharset=utf8,vers=1.0 "//"$NAS_IP"/"$BACKUP""$BACKUPNR"" "$NASMOUNTPOINT"

Using this command the error does no longer appear. smb3 was enabled on the nas samba server with smb3enable and smbstatus is showing that smb 3.02 is used for the connection. But the error does also appear using the smb2 protocol.

Thanks in advance for your help.
Comment 1 Steve French 2018-03-29 13:33:46 UTC
The warning message (which indicates the server does not have DFS, ie the global namespace feature of CIFS/SMB3 enabled, turned on on this share) has been removed and the commit is in linux-next and will be in 4.17

"[SMB3] Don't log expected error on DFS referral request"
Comment 2 thomas.schwark 2018-04-04 08:22:33 UTC
Thanks a lot for the fast help and explanation.

Note You need to log in before you can comment on or make changes to this bug.