[Fwd: Re: Latency after a cifs mount]

Benjamin Pavie <[email protected]>
Newsgroups gmane.linux.file-systems.cifs
Message-ID <1242387335.3722.33.camel@bpavie-desktop>
On Fri, 2009-05-15 at 13:32 -0400, Jeff Layton wrote:
> On Fri, 15 May 2009 00:24:15 -0500
> Benjamin Pavie <[email protected]> wrote:
> 
> > On Fri, 2009-05-15 at 13:13 -0400, Jeff Layton wrote:
> > > On Fri, 15 May 2009 03:38:16 +0000
> > > Benjamin Pavie <[email protected]> wrote:
> > > 
> > > > Hi everybody,
> > > > 
> > > > I have a problem of latency after mounting my partion using
cifs :
> > > > 
> > > > sudo mount -t
cifs //my.server.com/lab_share /home/bpavie/lab_share -o
> > > >
credentials=/etc/samba/user,iocharset=utf8,file_mode=0777,dir_mode=0777,uid=bpavie
> > > > 
> > > > When I run the following bash script,
> > > > #!/bin/bash
> > > > mkdir /home/bpavie/lab_share/test2
> > > > mkdir /home/bpavie/lab_share/test2/subTest
> > > > touch /home/bpavie/lab_share/test2/subTest/toto.txt
> > > > 
> > > > I have the following output :
> > > > bpavie@computer:~$ ./test.sh 
> > > > mkdir: cannot create directory
`/home/bpavie/lab_share/test2/subTest':
> > > > Permission denied
> > > > touch: cannot touch
`/home/bpavie/lab_share/test2/subTest/toto.txt':
> > > > Permission denied
> > > > 
> > > > So the first directory is created but not the sub-directory.
> > > > When I add a sleep between the creation of the directory test2
and the
> > > > subdirectory subTest, the first error vanish.
> > > > 
> > > > #!/bin/bash
> > > > mkdir /home/bpavie/lab_share/test2
> > > > sleep 1
> > > > mkdir /home/bpavie/lab_share/test2/subTest
> > > > touch /home/bpavie/lab_share/test2/subTest/toto.txt
> > > > 
> > > > bpavie@computer:~$ ./test.sh 
> > > > touch: cannot touch
`/home/bpavie/lab_share/test2/subTest/toto.txt':
> > > > Permission denied
> > > > 
> > > > 
> > > > It seems there is a kind of delay, how to fix that ?
> > > > 
> > > 
> > > What kernel are you using?
> > > 
> > bpavie@computer:~$ uname -r
> > 2.6.28-11-generic
> > 
> > Actually, I just made some progress :
> > I discover that if I execute this script as root and/or using sudo,
> > everything works fine, all the sub-directory and the .txt file are
> > created without warning.
> > 
> > How to have the same behavior for the normal user ? And is this
behavior
> > normal?
> > 
> 
> No, it's clearly broken if it changes after an amount of time. It
> sounds like a problem with inode attribute revalidation. That said,
> 2.6.28 is pretty old. You might want to check 2.6.29 and see if it
> fares better. Seems like we fixed some problems like that a while
back.
> 

I installed the kernel 2.6.29 but I still have the same problem :

bpavie@computer:~$ ./test.sh 
mkdir: cannot create directory `/home/bpavie/lab_share/test2/subTest':
Permission denied
touch: cannot touch `/home/bpavie/lab_share/test2/subTest/toto.txt':
Permission denied
bpavie@computer:~$ uname -r
2.6.29-02062903-generic

However, if I'm root, everything works :
bpavie@computer:~$ sudo ./test.sh 

Where test is :
#!/bin/bash
mkdir /home/bpavie/lab_share/test2
mkdir /home/bpavie/lab_share/test2/subTest
touch /home/bpavie/lab_share/test2/subTest/toto.txt

and /home/bpavie/lab_share/ is my cifs partition mounted.

Here is my configuration :

bpavie@computer:~$ modinfo cifs
filename:       /lib/modules/2.6.29-02062903-generic/kernel/fs/cifs/cifs.ko
version:        1.57
description:    VFS to access servers complying with the SNIA CIFS
Specification e.g. Samba and Windows
license:        GPL
author:         Steve French <[email protected]>
srcversion:     408B6A950DD913C5337FD8A
depends:        
vermagic:       2.6.29-02062903-generic SMP mod_unload modversions 586 
parm:           CIFSMaxBufSize:Network buffer size (not including
header). Default: 16384 Range: 8192 to 130048 (int)
parm:           cifs_min_rcv:Network buffers in pool. Default: 4 Range:
1 to 64 (int)
parm:           cifs_min_small:Small network buffers in pool. Default:
30 Range: 2 to 256 (int)
parm:           cifs_max_pending:Simultaneous requests to server.
Default: 50 Range: 2 to 256 (int)



Benjamin

_______________________________________________
linux-cifs-client mailing list
[email protected]
https://lists.samba.org/mailman/listinfo/linux-cifs-client
(unnamed) (message/rfc822, 3.6 KB) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.