[linux-cifs-client] Problems with rename to open file and open/unlink/create

Jeff Layton jlayton at redhat.com
Mon Apr 6 15:36:17 GMT 2009


On Mon, 6 Apr 2009 17:18:30 +0200
Wilhelm Meier <wilhelm.meier at fh-kl.de> wrote:

> Hi all,
> 
> we use a cifs-1.56 (the backported sources from Steve French) together 
> with a 2.6.27-kernel. As we encounter some weired problems with 
> kmail, I took my cifs-test-programs (see attchements) and I got 
> strange results.
> 
> 1) t_byterangelocking: all fine
> 
> 2) t_rename: test ok, but leaves around cifsXXXX-files
> 
> 3) t_openunlinkclose: test ok, but leaves also around cifsXXX-files
> 
> Below you find the /proc/mounts and DebugData.
> 
> I think the cifsXXXX files are the cause of problems to kmail.
> Do you have any ideas?
> 
> Thx,
> 
> Wilhelm
> 
> //kmux-svc/kmux.admin /home/kmux.admin cifs 
> rw,unc=\\kmux-svc\kmux.admin,username=kmux.admin,domain=kmux,addr=192.168.32.12,uid=999,gid=999,posixpaths,serverino,nobrl,acl,rsize=16384,wsize=57344 
> 0 0
> 
> kmux.admin at rich00018061EBDD:~$ cat /proc/fs/cifs/DebugData
> Display Internal CIFS Data Structures for Debugging
> ---------------------------------------------------
> CIFS Version 1.56
> Active VFS Requests: 0
> Servers:
> 1) Name: 192.168.32.12  Domain: KMUX Uses: 4 OS: Unix
>         NOS: Samba 3.0.28a      Capability: 0x80e3fd
		^^^^^^^^^^^
I think that this version of samba may not handle the delete_on_close
bit properly. I ran across this when trying to fix this code and left
some comments to that effect:

                /*
                 * some samba versions return -ENOENT when we try to set the
                 * file disposition here. Likely a samba bug, but work around
                 * it for now. This means that some cifsXXX files may hang
                 * around after they shouldn't.
                 *
                 * BB: remove this hack after more servers have the fix
                 */
                if (rc == -ENOENT)
                        rc = 0;
                else if (rc != 0) {
                        rc = -ETXTBSY;
                        goto undo_rename;
                }
                cifsInode->delete_pending = true;

...you may want to test against a newer samba version. Maybe we should
change this to pop a printk when we hit this problem?

-- 
Jeff Layton <jlayton at redhat.com>


More information about the linux-cifs-client mailing list