bug doing simple stat call to mountpoint
Hi,
I'm using autofs 5.0.5, kernel 2.6.38.6.
In the construction I'm working on I got the following error:
stat /mnt/mount.md5key/sbon/0/0a8805e89f4cc6653185a4ec4335cca1
stat: cannot stat `/mnt/mount.md5key/sbon/0/0a8805e89f4cc6653185a4ec4335cca1': No such file or directory
sbon [ /tmp/mount.md5key/users/sbon/cache/0a8805e89f4cc6653185a4ec4335cca1 ]$ ls /mnt/mount.md5key/sbon/0/0a8805e89f4cc6653185a4ec4335cca1 <gives contents as expected>
The automounter does not call the mount command in the first case, and like it should in the second.
mount | grep 55ed
//SCLFS20091030/sbon on /mnt/mount.md5key/sbon/0/55ed21dee4bb9604117a013e57dc5690 type cifs (rw)
When then again the first command (=share is mounted):
stat /mnt/mount.md5key/sbon/0/55ed21dee4bb9604117a013e57dc5690
File: `/mnt/mount.md5key/sbon/0/55ed21dee4bb9604117a013e57dc5690'
Size: 0 Blocks: 0 IO Block: 16384 directory
Device: 19h/25d Inode: 77256 Links: 35
Access: (0755/drwxr-xr-x) Uid: ( 4000/ sbon) Gid: ( 3000/netgroup)
Access: 2011-06-05 18:06:06.000000000 +0200
Modify: 2011-06-05 18:03:00.000000000 +0200
Change: 2011-06-05 18:03:00.000000000 +0200
This not ok.
I've reinstalled autofs with the latest patches already, did not help.
Stef
Quoted 11 lines · Stef Bon
Hi,
I'm using autofs 5.0.5, kernel 2.6.38.6.
In the construction I'm working on I got the following error:
stat
/mnt/mount.md5key/sbon/0/0a8805e89f4cc6653185a4ec4335cca1
stat: cannot stat `/mnt/mount.md5key/sbon/0/0a8805e89f4cc6653185a4ec4335cca1': No such file or directory
sbon [/tmp/mount.md5key/users/sbon/cache/0a8805e89f4cc6653185a4ec4335cca1]$ ls/mnt/mount.md5key/sbon/0/0a8805e89f4cc6653185a4ec4335cca1<gives contents as expected>
Quoted 5 lines
The automounter does not call the mount command in the first case, and like it should in the second.
mount | grep 55ed
//SCLFS20091030/sbon on/mnt/mount.md5key/sbon/0/55ed21dee4bb9604117a013e57dc5690type cifs (rw)
I'm sorry I'm mixing two mountpoints here:
mount | grep 0a88
//SCLFS20091030/ftp on /mnt/mount.md5key/sbon/0/0a8805e89f4cc6653185a4ec4335cca1 type cifs (rw)
and
stat /mnt/mount.md5key/sbon/0/0a8805e89f4cc6653185a4ec4335cca1
File: `/mnt/mount.md5key/sbon/0/0a8805e89f4cc6653185a4ec4335cca1'
Size: 0 Blocks: 0 IO Block: 16384 directory
Device: 18h/24d Inode: 2 Links: 692
Access: (0755/drwxr-xr-x) Uid: ( 4024/ gast) Gid: ( 3000/netgroup)
Access: 2011-06-05 18:36:16.283327100 +0200
Modify: 2011-05-08 23:30:59.245301800 +0200
Change: 2011-05-08 23:30:59.245301800 +0200
Stef
Quoted 10 lines · Stef Bon
Hi,
I'm using autofs 5.0.5, kernel 2.6.38.6.
In the construction I'm working on I got the following error:
stat
/mnt/mount.md5key/sbon/0/0a8805e89f4cc6653185a4ec4335cca1
stat: cannot stat `/mnt/mount.md5key/sbon/0/0a8805e89f4cc6653185a4ec4335cca1': No such file or directory
sbon [/tmp/mount.md5key/users/sbon/cache/0a8805e89f4cc6653185a4ec4335cca1]$ ls/mnt/mount.md5key/sbon/0/0a8805e89f4cc6653185a4ec4335cca1<gives contents as expected>
I've tried linux 2.6.39.1, and same behaviour. I'll try an older kernel (2.6.37....)
Stef
Quoted 5 lines · Stef Bon
Quoted 4 lines · Stef Bon
Hi,
I'm using autofs 5.0.5, kernel 2.6.38.6.
Quoted 8 lines
Quoted 6 lines
In the construction I'm working on I got the following error:
stat
/mnt/mount.md5key/sbon/0/0a8805e89f4cc6653185a4ec4335cca1
stat: cannot stat `/mnt/mount.md5key/sbon/0/0a8805e89f4cc6653185a4ec4335cca1': No such file or directory
sbon [/tmp/mount.md5key/users/sbon/cache/0a8805e89f4cc6653185a4ec4335cca1]$ ls/mnt/mount.md5key/sbon/0/0a8805e89f4cc6653185a4ec4335cca1<gives contents as expected>I've tried linux 2.6.39.1, and same behaviour. I'll try an older kernel (2.6.37....)
Oef I have found the cause of this. I had to add a trailing slash, like:
stat /mnt/mount.md5key/sbon/0/0a8805e89f4cc6653185a4ec4335cca/
this makes the automount mount.
Stef
Quoted 8 lines
Stef
_______________________________________________
autofs mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/autofs
Ian Kent
maintainerQuoted 17 lines · Stef Bon
Quoted 16 lines · Stef Bon
Quoted 14 lines · Stef Bon
Hi,
I'm using autofs 5.0.5, kernel 2.6.38.6.
In the construction I'm working on I got the following error:
stat
/mnt/mount.md5key/sbon/0/0a8805e89f4cc6653185a4ec4335cca1
stat: cannot stat `/mnt/mount.md5key/sbon/0/0a8805e89f4cc6653185a4ec4335cca1': No such file or directory
sbon [/tmp/mount.md5key/users/sbon/cache/0a8805e89f4cc6653185a4ec4335cca1]$ ls/mnt/mount.md5key/sbon/0/0a8805e89f4cc6653185a4ec4335cca1<gives contents as expected>
Quoted 8 lines
Quoted 2 lines
I've tried linux 2.6.39.1, and same behaviour. I'll try an older kernel (2.6.37....)
Oef I have found the cause of this. I had to add a trailing slash, like:
stat
/mnt/mount.md5key/sbon/0/0a8805e89f4cc6653185a4ec4335cca/this makes the automount mount.
That's right.
There are significant changes to the kernel automount infrastructure from 2.6.38, most notably what you saw here. Be aware that 2.6.38 has some problems and 2.6.39 or later should be used if at all possible.
Hopefully there won't be too many problems resulting from the changes.
For information, the comment in the VFS function
fs/namei.c:follow_automount() is:
/* We want to mount if someone is trying to open/create a file of any
* type under the mountpoint, wants to traverse through the mountpoint
* or wants to open the mounted directory.
*
* We don't want to mount if someone's just doing a stat and they've
* set AT_SYMLINK_NOFOLLOW - unless they're stat'ing a directory and
* appended a '/' to the name.
*
* An exception to this is autofs. It needs to tell lies on stat(2)
* to prevent mount storms for things like color ls so it can set a
* dentry flag to provide for this.
*/
Although I think the last paragraph is actually not correct since there is no distinction between autofs and other execution threads in the test that follows the comment.
Ian