Skip to contentSkip to conversation

mount dfs share failed becaus e of missing username

DISCUSSION Xiaoli Feng 2 participants 2 messages Jan 27, 2021 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive

Hello guys,

I met a bug. Mount dfs root share failed on v5.11.0-rc5. But It's success on v5.10.

[root@ibm-x3650m4-01-vm-14 ~]# mount -vvv //localhost/dfsroot cifs -o user=root,password=redhat mount.cifs kernel mount options: ip=::1,unc=\\localhost\dfsroot,user=root,pass=******** mount error(22): Invalid argument

dmesg log:

[ 1648.025424] CIFS: fs/cifs/connect.c: build_unc_path_to_root: full_path=\\localhost\dfsroot
[ 1648.025427] CIFS: fs/cifs/connect.c: build_unc_path_to_root: full_path=\\localhost\dfsroot
[ 1648.025429] CIFS: fs/cifs/connect.c: build_unc_path_to_root: full_path=\\localhost\dfsroot
[ 1648.025434] CIFS: fs/cifs/dfs_cache.c: __dfs_cache_find: search path: \localhost\dfsroot
[ 1648.025437] CIFS: fs/cifs/dfs_cache.c: setup_referral: set up new ref
[ 1648.026760] CIFS: fs/cifs/dns_resolve.c: dns_resolve_server_name_to_ip: resolved: localhost to 127.0.0.1
[ 1648.026773] CIFS: VFS: No username specified
[ 1648.028008] CIFS: fs/cifs/connect.c: cifs_put_smb_ses: ses_count=3
[ 1648.028012] CIFS: fs/cifs/connect.c: cifs_put_tcon: tc_count=1
[ 1648.028014] CIFS: fs/cifs/connect.c: VFS: in cifs_put_tcon as Xid: 32 with uid: 0
[ 1648.028017] CIFS: fs/cifs/smb2pdu.c: Tree Disconnect
[ 1648.028385] CIFS: fs/cifs/connect.c: cifs_put_smb_ses: ses_count=2
[ 1648.028390] CIFS: fs/cifs/connect.c: VFS: leaving mount_put_conns (xid = 29) rc = 0
[ 1648.028393] CIFS: VFS: cifs_mount failed w/return code = -22

More info please look https://bugzilla.kernel.org/show_bug.cgi?id=211345.

Thanks.

Signature · 8 lines
Best regards!
XiaoLi Feng 冯小丽

Red Hat Software (Beijing) Co.,Ltd
filesystem-qe Team
IRC:xifeng,#channel: fs-qe
Tel:+86-10-8388112
9/F, Raycom
#2 lore raw

Yeah, there are a few bugs with dfs in the new mount api. One bug is in connect.c:expand_dfs_referrals() where we should remove the call to
smb3_cleanup_fs_context_content(). But it is not sufficient. as we will just loop and never resolve the actual DFS referral.

I am trying to find where we lost that.

Quoted 40 lines · Xiaoli Feng

Hello guys,

I met a bug. Mount dfs root share failed on v5.11.0-rc5. But It's success on v5.10.

[root@ibm-x3650m4-01-vm-14 ~]# mount -vvv //localhost/dfsroot cifs -o user=root,password=redhat mount.cifs kernel mount options: ip=::1,unc=\\localhost\dfsroot,user=root,pass=******** mount error(22): Invalid argument

dmesg log:

[ 1648.025424] CIFS: fs/cifs/connect.c: build_unc_path_to_root: full_path=\\localhost\dfsroot
[ 1648.025427] CIFS: fs/cifs/connect.c: build_unc_path_to_root: full_path=\\localhost\dfsroot
[ 1648.025429] CIFS: fs/cifs/connect.c: build_unc_path_to_root: full_path=\\localhost\dfsroot
[ 1648.025434] CIFS: fs/cifs/dfs_cache.c: __dfs_cache_find: search path: \localhost\dfsroot
[ 1648.025437] CIFS: fs/cifs/dfs_cache.c: setup_referral: set up new ref
[ 1648.026760] CIFS: fs/cifs/dns_resolve.c: dns_resolve_server_name_to_ip: resolved: localhost to 127.0.0.1
[ 1648.026773] CIFS: VFS: No username specified
[ 1648.028008] CIFS: fs/cifs/connect.c: cifs_put_smb_ses: ses_count=3
[ 1648.028012] CIFS: fs/cifs/connect.c: cifs_put_tcon: tc_count=1
[ 1648.028014] CIFS: fs/cifs/connect.c: VFS: in cifs_put_tcon as Xid: 32 with uid: 0
[ 1648.028017] CIFS: fs/cifs/smb2pdu.c: Tree Disconnect
[ 1648.028385] CIFS: fs/cifs/connect.c: cifs_put_smb_ses: ses_count=2
[ 1648.028390] CIFS: fs/cifs/connect.c: VFS: leaving mount_put_conns (xid = 29) rc = 0
[ 1648.028393] CIFS: VFS: cifs_mount failed w/return code = -22

More info please look https://bugzilla.kernel.org/show_bug.cgi?id=211345.

Thanks.

--
Best regards!
XiaoLi Feng 冯小丽

Red Hat Software (Beijing) Co.,Ltd
filesystem-qe Team
IRC:xifeng,#channel: fs-qe
Tel:+86-10-8388112
9/F, Raycom