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

Wilhelm Meier wilhelm.meier at fh-kl.de
Tue Apr 7 06:03:56 GMT 2009


Am Montag 06 April 2009 schrieb Jeff Layton:
> 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,rsiz
> >e=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:

Well, I tested also will samba-3.3.2 (ubuntu package) and samba-3.3.3 
(compiled).

Now the t_rename succeeds, but t_openunlinkclose still produces 
cifsXXXX files. Yes, and kmail keeps crashing.

I read something about the readdir implementation in cifs >= 1.56, but 
this seems not to the case in the 

http://pserver.samba.org/samba/ftp/cifs-cvs/cifs-1.56-backport-for-2.6.25-2.6.28.tar.gz

backport I used here for the 2.6.27-kernel. Are there any cifs-1.57 
versions backported to linux-2.6.27?

>
>                 /*
>                  * 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?



-- 
Wilhelm


More information about the linux-cifs-client mailing list