Bug 211345 - CIFS: can't mount dfs share
Summary: CIFS: can't mount dfs share
Status: NEW
Alias: None
Product: File System
Classification: Unclassified
Component: CIFS (show other bugs)
Hardware: All Linux
: P1 blocking
Assignee: fs_cifs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-01-26 05:29 UTC by Xiaoli Feng
Modified: 2021-01-26 05:51 UTC (History)
0 users

See Also:
Kernel Version: 5.11.0-0.rc5
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description Xiaoli Feng 2021-01-26 05:29:15 UTC
The samba server and client is on the same host. Setup msdfs. And try to mount dfs share. But it's failed. And kernel print this error:
"CIFS: VFS: No username specified".

[root@ibm-x3650m4-01-vm-14 ~]# cat /etc/samba/smb.conf
[global]
        workgroup = EXAMPLE
        ntlm auth = yes

[dfsroot]
   path = /mnt/testarea/server/dfsroot
   comment = dfs root
   msdfs root = yes
   browseable = yes
   writable = no
   guest ok = yes

[dfsshare]
   path = /mnt/testarea/server/dfsshare
   guest ok = yes
   writeable = no

[root@ibm-x3650m4-01-vm-14 ~]# ln -s "msdfs:$HOSTNAME\\dfsshare" /mnt/testarea/server/dfsroot/testlink
[root@ibm-x3650m4-01-vm-14 ~]# mount //localhost/dfsroot cifs -o user=root,password=redhat
mount error(22): Invalid argument
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log messages (dmesg)
[root@ibm-x3650m4-01-vm-14 ~]# dmesg
[  374.029067] Key type dns_resolver registered
[  374.451349] Key type cifs.spnego registered
[  374.453008] Key type cifs.idmap registered
[  374.455526] CIFS: No dialect specified on mount. Default has changed to a more secure dialect, SMB2.1 or later (e.g. SMB3.1.1), from CIFS (SMB1). To use the less secure SMB1 dialect to access old servers which do not support SMB3.1.1 (or even SMB3 or SMB2.1) specify vers=1.0 on mount.
[  374.462585] CIFS: Attempting to mount \\localhost\dfsroot
[  374.567312] CIFS: VFS: No username specified
[  374.582787] CIFS: VFS: cifs_mount failed w/return code = -22
[root@ibm-x3650m4-01-vm-14 ~]#
[root@ibm-x3650m4-01-vm-14 ~]# mount //localhost/dfsshare cifs -o user=root,password=redhat
[root@ibm-x3650m4-01-vm-14 ~]#
Comment 1 Xiaoli Feng 2021-01-26 05:32:56 UTC
[root@ibm-x3650m4-01-vm-14 ~]# uname -r
5.11.0-rc5
[root@ibm-x3650m4-01-vm-14 ~]# rpm -q samba
samba-4.13.3-1.el9.x86_64
[root@ibm-x3650m4-01-vm-14 ~]# rpm -q cifs-utils
cifs-utils-6.11-2.el9.x86_64
Comment 2 Xiaoli Feng 2021-01-26 05:40:11 UTC
Then try to mount the dfs link. It's failed by "cifs: Unknown parameter 'prefixpath'".  

[root@ibm-x3650m4-01-vm-14 ~]#  mount //localhost/dfsroot/testlink cifs -o user=root,password=redhat
mount error(22): Invalid argument
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log messages (dmesg)
[root@ibm-x3650m4-01-vm-14 ~]#

dmesg:

[ 1285.811457] CIFS: fs/cifs/inode.c: VFS: in cifs_revalidate_dentry_attr as Xid: 27 with uid: 0
[ 1285.811479] CIFS: fs/cifs/inode.c: Update attributes:  inode 0x000000001857cfcb count 1 dentry: 0x000000002416ad57 d_time 0 jiffies 4295952849
[ 1285.811506] CIFS: fs/cifs/transport.c: wait_for_free_credits: remove 3 credits total=413
[ 1285.811523] CIFS: fs/cifs/transport.c: Sending smb: smb_len=348
[ 1285.812313] CIFS: fs/cifs/connect.c: RFC1002 header 0x200
[ 1285.812322] CIFS: fs/cifs/smb2misc.c: SMB2 data length 56 offset 152
[ 1285.812325] CIFS: fs/cifs/smb2misc.c: SMB2 len 208
[ 1285.812331] CIFS: fs/cifs/smb2misc.c: SMB2 data length 102 offset 72
[ 1285.812359] CIFS: fs/cifs/smb2misc.c: SMB2 len 174
[ 1285.812361] CIFS: fs/cifs/smb2misc.c: Calculated size 174 length 176 mismatch mid 32
[ 1285.812367] CIFS: fs/cifs/smb2misc.c: SMB2 len 124
[ 1285.812369] CIFS: fs/cifs/smb2misc.c: Calculated size 124 length 128 mismatch mid 33
[ 1285.812371] CIFS: fs/cifs/smb2ops.c: smb2_add_credits: added 30 credits total=445
[ 1285.812475] CIFS: fs/cifs/transport.c: cifs_sync_mid_result: cmd=5 mid=31 state=4
[ 1285.812482] CIFS: fs/cifs/transport.c: cifs_sync_mid_result: cmd=16 mid=32 state=4
[ 1285.812484] CIFS: fs/cifs/transport.c: cifs_sync_mid_result: cmd=6 mid=33 state=4
[ 1285.812487] CIFS: fs/cifs/misc.c: Null buffer passed to cifs_small_buf_release
[ 1285.812489] CIFS: fs/cifs/misc.c: Null buffer passed to cifs_small_buf_release
[ 1285.812491] CIFS: fs/cifs/misc.c: Null buffer passed to cifs_small_buf_release
[ 1285.812497] CIFS: fs/cifs/inode.c: cifs_revalidate_cache: revalidating inode 104985156
[ 1285.812500] CIFS: fs/cifs/inode.c: cifs_revalidate_cache: inode 104985156 is unchanged
[ 1285.812503] CIFS: fs/cifs/inode.c: VFS: leaving cifs_revalidate_dentry_attr (xid = 27) rc = 0
[ 1285.816007] CIFS: fs/cifs/fs_context.c: CIFS: parsing cifs mount option 'source'
[ 1285.816017] CIFS: fs/cifs/fs_context.c: CIFS: parsing cifs mount option 'ip'
[ 1285.816021] CIFS: fs/cifs/fs_context.c: CIFS: parsing cifs mount option 'unc'
[ 1285.816024] CIFS: fs/cifs/fs_context.c: CIFS: parsing cifs mount option 'user'
[ 1285.816026] CIFS: fs/cifs/fs_context.c: CIFS: parsing cifs mount option 'prefixpath'
[ 1285.816030] cifs: Unknown parameter 'prefixpath'
Comment 3 Xiaoli Feng 2021-01-26 05:51:20 UTC
It's a regression issue. v5.10 doesn't have this issue.

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