Hide Forgot
Description of problem: When use cifs to mount a share in Windows and you have write and rename routines samba hung. Enabling the Debug in samba you can check that it return some error messages: Status code returned 0xc0000034 NT_STATUS_OBJECT_NAME_NOT_FOUND fs/cifs/netmisc.c: Mapping smb error code 2 to POSIX err -2 fs/cifs/cifssmb.c: Send error in QPathInfo = -2 Version-Release number of selected component (if applicable): samba-common-3.0.33-3.29.el5_6.2 samba-3.0.33-3.29.el5_6.2 How reproducible: 100% Steps to Reproduce: 1. Mount a Windows Share using cifs: mount -t cifs //ADLAB/C$ /mnt -o user=Administrator or mount it using the /etc/fstab: //192.168.218.122/C$ /mnt/ cifs nodfs,iocharset=utf8,nounix,noserverino,file_mode=0777,dir_mode=0777,user=Administrator,password=MYpassword,noperms 0 0 Do not matter the /etc/fstab options, you can omit it. 2. Active a Debug in cifs: # echo 7 > /proc/fs/cifs/cifsFYI 3. Access the Share and copy any file to this place and rename the file: # cd /mnt/Share # cp /tmp/text_file.txt . # mv text_file.txt text.txt 4. Collect the content from dmesg: # dmesg > /tmp/dmesg.txt You can check in /tmp/dmesg.txt file the output from your changes and you can see that you have a STATUS_OBJECT_NAME_NOT_FOUND error Actual results: Analysing the logs you can check that you have errors when you rename files in share: fs/cifs/inode.c: Revalidate: \mnt\Share inode 0xffff810025efa090 count 1 dentry: 0xffff810033563810 d_time 4297546009 jiffies 4297557485 fs/cifs/inode.c: CIFS VFS: leaving cifs_revalidate (xid = 713) rc = 0 fs/cifs/dir.c: CIFS VFS: in cifs_lookup as Xid: 714 with uid: 0 fs/cifs/dir.c: parent inode = 0xffff810025efa090 name is: text_file.txt and dentry = 0xffff8100338049c0 fs/cifs/dir.c: NULL inode in lookup fs/cifs/dir.c: Full path: \mnt\Share\text_file.txt inode = 0x0000000000000000 fs/cifs/inode.c: Getting info on \mnt\Share\text_file.txt fs/cifs/transport.c: For smb_command 50 fs/cifs/transport.c: Sending smb: total_len 180 fs/cifs/connect.c: rfc1002 length 0x27 fs/cifs/connect.c: invalid transact2 word count Status code returned 0xc0000034 NT_STATUS_OBJECT_NAME_NOT_FOUND fs/cifs/netmisc.c: Mapping smb error code 2 to POSIX err -2 fs/cifs/cifssmb.c: Send error in QPathInfo = -2 fs/cifs/dir.c: CIFS VFS: leaving cifs_lookup (xid = 714) rc = 0 fs/cifs/dir.c: neg dentry 0xffff8100338049c0 name = text_file.txt fs/cifs/dir.c: CIFS VFS: in cifs_create as Xid: 715 with uid: 0 fs/cifs/transport.c: For smb_command 162 fs/cifs/transport.c: Sending smb: total_len 192 fs/cifs/connect.c: rfc1002 length 0x6b fs/cifs/inode.c: Getting info on \mnt\Share\text_file.txt Expected results: Do not get the above error when rename a file in a share. Additional info: 1-) Founded the same error in upstream version from samba. The bugzilla from samba.org project refer this error including it in RHEL 5 and Fedora. https://bugzilla.samba.org/show_bug.cgi?id=5790 It is possible to backport this changes to RHEL samba version? 2-) Not tested yet in samba3x package.
1. Removed samba # yum remove samba samba-common Removed: samba.x86_64 0:3.0.33-3.29.el5_6.2 samba-common.x86_64 0:3.0.33-3.29.el5_6.2 Complete! 2. Installed samba3x # yum install samba3x samba3x-common Installed: samba3x.x86_64 0:3.5.4-0.70.el5_6.1 samba3x-common.x86_64 0:3.5.4-0.70.el5_6.1 Dependency Installed: libtalloc.x86_64 0:2.0.1-11.el5 libtdb.x86_64 0:1.2.1-5.el5 samba3x-winbind.x86_64 0:3.5.4-0.70.el5_6.1 3. Mounted the cifs share # cat /etc/fstab | grep -i cifs //LABAD/C$ /mnt/ cifs nodfs,iocharset=utf8,nounix,noserverino,file_mode=0777,dir_mode=0777,user=Administrator,password=MYpassword,noperms 0 0 # mount -a 4. Active debug # echo 7 > /proc/fs/cifs/cifsFYI 5. Writing and Changing file name: # cd /mnt/Share/ # cp /etc/group . # mv group groups.txt # cd / # umount /mnt # dmesg > /tmp/kern2.txt 6. Content from log /tmp/kern2.txt fs/cifs/inode.c: Revalidate: \Share inode 0xffff8100305ac0d0 count 1 dentry: 0xffff81002e5db9c0 d_time 4297005951 jiffies 4297007854 fs/cifs/inode.c: CIFS VFS: leaving cifs_revalidate (xid = 139) rc = 0 fs/cifs/inode.c: CIFS VFS: in cifs_revalidate as Xid: 140 with uid: 0 fs/cifs/inode.c: Revalidate: \Share inode 0xffff8100305ac0d0 count 1 dentry: 0xffff81002e5db9c0 d_time 4297005951 jiffies 4297007854 fs/cifs/inode.c: CIFS VFS: leaving cifs_revalidate (xid = 140) rc = 0 fs/cifs/inode.c: CIFS VFS: in cifs_revalidate as Xid: 141 with uid: 0 fs/cifs/inode.c: Revalidate: \Share inode 0xffff8100305ac0d0 count 1 dentry: 0xffff81002e5db9c0 d_time 4297005951 jiffies 4297017539 fs/cifs/inode.c: Getting info on \Share fs/cifs/transport.c: For smb_command 50 fs/cifs/transport.c: Sending smb: total_len 90 fs/cifs/connect.c: rfc1002 length 0x94 fs/cifs/inode.c: Old time 4297007854 fs/cifs/inode.c: New time 4297017539 fs/cifs/inode.c: cifs_revalidate - inode unchanged fs/cifs/inode.c: CIFS VFS: leaving cifs_revalidate (xid = 141) rc = 0 fs/cifs/dir.c: CIFS VFS: in cifs_lookup as Xid: 142 with uid: 0 fs/cifs/dir.c: parent inode = 0xffff8100305ac0d0 name is: group and dentry = 0xffff81002e7bd588 fs/cifs/dir.c: NULL inode in lookup fs/cifs/dir.c: Full path: \Share\group inode = 0x0000000000000000 fs/cifs/inode.c: Getting info on \Share\group fs/cifs/transport.c: For smb_command 50 fs/cifs/transport.c: Sending smb: total_len 102 fs/cifs/connect.c: rfc1002 length 0x27 fs/cifs/connect.c: invalid transact2 word count Status code returned 0xc0000034 NT_STATUS_OBJECT_NAME_NOT_FOUND fs/cifs/netmisc.c: Mapping smb error code 2 to POSIX err -2 fs/cifs/cifssmb.c: Send error in QPathInfo = -2 fs/cifs/dir.c: CIFS VFS: leaving cifs_lookup (xid = 142) rc = 0 fs/cifs/dir.c: neg dentry 0xffff81002e7bd588 name = group fs/cifs/dir.c: CIFS VFS: in cifs_create as Xid: 143 with uid: 0 fs/cifs/transport.c: For smb_command 162 fs/cifs/transport.c: Sending smb: total_len 114 fs/cifs/connect.c: rfc1002 length 0x6b fs/cifs/inode.c: Getting info on \Share\group fs/cifs/inode.c: Old time 0 Same behavior with samba3x package.
Resetting for 5.8. I don't see us getting this fixed in any fashion in time for 5.7.
This seriously looks like NOTABUG. You're cranking up cifsFYI and then are concerned that it prints things that look like errors? That's expected when you turn up debugging info (which is what cifsFYI is). I'll assume that you're not seeing these messages FWIW, that error in this situation is expected. To do a lookup, cifs.ko does a QPathInfo call for the file in question. In this case, the VFS wants to look up the target of the copy. It does that and samba returns an error since that file doesn't exist. I see nothing that indicates anything other than expected behavior, so I'm going to close this as NOTABUG. Please reopen if you want to discuss it further.