All of lore.kernel.org
 help / color / mirror / Atom feed
* stat -L triggering mount (behavior change starting with 2.6.38-rc1)
@ 2011-03-28 22:53 Leonardo Chiquitto
  2011-04-01  4:27 ` Ian Kent
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Leonardo Chiquitto @ 2011-03-28 22:53 UTC (permalink / raw)
  To: autofs

[-- Attachment #1: Type: text/plain, Size: 1396 bytes --]

Hello,

After the update to 2.6.38, I noticed that AutoFS started to mount volumes
at times it normally wouldn't. More specifically, "ls -la" inside an AutoFS
mount point will trigger the mount of all available maps.

This can be reproduced with a simple indirect mount setup:

# cat /etc/auto.master
/data	/etc/auto.data

# cat /etc/auto.data
isos	-fstype=nfs4,ro,rsize=8192,wsize=8192,intr,nolock,nosuid libre:/isos

# egrep '(autofs|nfs4)' /proc/mounts
/etc/auto.data /data autofs rw,relatime,fd=7,pgrp=4300,timeout=600,minproto=5,\
  maxproto=5,indirect 0 0

# stat -L /data/isos > /dev/null

# egrep '(autofs|nfs4)' /proc/mounts
/etc/auto.data /data autofs rw,relatime,fd=7,pgrp=4300,timeout=600,minproto=5,\
  maxproto=5,indirect 0 0
libre:/isos /data/isos nfs4 ro,nosuid,relatime,vers=4,(.. more mount
options ..) 0 0

Bisecting the changes between 2.6.37 and 2.6.38, I found that 2.6.38-rc1
exhibits the new behavior already. I went as near 2.6.37 as I could and verified
that commit b650c858c2 (autofs4: Merge the remaining dentry ops tables) also
shows the new behavior. I tried to bisect the remaining ~18 commits
but everything
I tested/built ended up unbootable.

I also tested mainline and verified that the problem is still there.

Although everything points to a kernel change, I'm attaching debug logs from
the automounter, just in case it's useful to someone.

Thanks,
Leonardo

[-- Attachment #2: messages-n63.txt --]
[-- Type: text/plain, Size: 3671 bytes --]

=== STARTUP

Mar 28 19:30:43 n63 automount[4389]: Starting automounter version 5.0.5, master map auto.master
Mar 28 19:30:43 n63 automount[4389]: using kernel protocol version 5.02
Mar 28 19:30:43 n63 automount[4389]: lookup_nss_read_master: reading master files auto.master
Mar 28 19:30:43 n63 automount[4389]: parse_init: parse(sun): init gathered global options: (null)
Mar 28 19:30:43 n63 automount[4389]: lookup_read_master: lookup(file): read entry /data
Mar 28 19:30:43 n63 automount[4389]: master_do_mount: mounting /data
Mar 28 19:30:43 n63 automount[4389]: automount_path_to_fifo: fifo name /var/run/autofs.fifo-data
Mar 28 19:30:43 n63 automount[4389]: lookup_nss_read_map: reading map file /etc/auto.data
Mar 28 19:30:43 n63 automount[4389]: parse_init: parse(sun): init gathered global options: (null)
Mar 28 19:30:43 n63 automount[4389]: mounted indirect on /data with timeout 600, freq 150 seconds
Mar 28 19:30:43 n63 automount[4389]: st_ready: st_ready(): state = 0 path /data
Mar 28 19:30:43 n63 automount[4389]: ghosting enabled

=== COMMAND: stat -L /data/isos

Mar 28 19:31:18 n63 automount[4389]: handle_packet: type = 3
Mar 28 19:31:18 n63 automount[4389]: handle_packet_missing_indirect: token 1, name isos, request pid 4398
Mar 28 19:31:18 n63 automount[4389]: attempting to mount entry /data/isos
Mar 28 19:31:18 n63 automount[4389]: lookup_mount: lookup(file): looking up isos
Mar 28 19:31:18 n63 automount[4389]: lookup_mount: lookup(file): isos -> -fstype=nfs4,ro,rsize=8192,wsize=8192,intr,nolock,nosuid libre:/isos
Mar 28 19:31:18 n63 automount[4389]: parse_mount: parse(sun): expanded entry: -fstype=nfs4,ro,rsize=8192,wsize=8192,intr,nolock,nosuid libre:/isos
Mar 28 19:31:18 n63 automount[4389]: parse_mount: parse(sun): gathered options: fstype=nfs4,ro,rsize=8192,wsize=8192,intr,nolock,nosuid
Mar 28 19:31:18 n63 automount[4389]: parse_mount: parse(sun): dequote("libre:/isos") -> libre:/isos
Mar 28 19:31:18 n63 automount[4389]: parse_mount: parse(sun): core of entry: options=fstype=nfs4,ro,rsize=8192,wsize=8192,intr,nolock,nosuid, loc=libre:/isos
Mar 28 19:31:18 n63 automount[4389]: sun_mount: parse(sun): mounting root /data, mountpoint isos, what libre:/isos, fstype nfs4, options ro,rsize=8192,wsize=8192,intr,nolock,nosuid
Mar 28 19:31:18 n63 automount[4389]: mount_mount: mount(nfs): root=/data name=isos what=libre:/isos, fstype=nfs4, options=ro,rsize=8192,wsize=8192,intr,nolock,nosuid
Mar 28 19:31:18 n63 automount[4389]: mount_mount: mount(nfs): nfs options="ro,rsize=8192,wsize=8192,intr,nolock,nosuid", nosymlink=0, ro=1
Mar 28 19:31:18 n63 automount[4389]: mount_mount: mount(nfs): calling mkdir_path /data/isos
Mar 28 19:31:18 n63 automount[4389]: mount_mount: mount(nfs): calling mount -t nfs4 -s -o ro,rsize=8192,wsize=8192,intr,nolock,nosuid libre:/isos /data/isos
Mar 28 19:31:18 n63 request-key: Cannot find command to construct key 33463049
Mar 28 19:31:18 n63 request-key: Cannot find command to construct key 481955300
Mar 28 19:31:18 n63 automount[4389]: mount_mount: mount(nfs): mounted libre:/isos on /data/isos
Mar 28 19:31:18 n63 automount[4389]: dev_ioctl_send_ready: token = 1
Mar 28 19:31:18 n63 automount[4389]: mounted /data/isos
Mar 28 19:31:18 n63 automount[4389]: st_readmap: state 1 path /data
Mar 28 19:31:18 n63 automount[4389]: re-reading map for /data
Mar 28 19:31:18 n63 automount[4389]: lookup_nss_read_map: reading map file /etc/auto.data
Mar 28 19:31:18 n63 automount[4389]: parse_init: parse(sun): init gathered global options: (null)
Mar 28 19:31:18 n63 automount[4389]: st_ready: st_ready(): state = 4 path /data
Mar 28 19:31:21 n63 dhclient: XMT: Solicit on eth0, interval 113240ms.


[-- Attachment #3: Type: text/plain, Size: 140 bytes --]

_______________________________________________
autofs mailing list
autofs@linux.kernel.org
http://linux.kernel.org/mailman/listinfo/autofs

^ permalink raw reply	[flat|nested] 14+ messages in thread
* stat -L triggering mount (behavior change starting with 2.6.38-rc1)
@ 2011-03-30 16:19 Leonardo Chiquitto
  0 siblings, 0 replies; 14+ messages in thread
From: Leonardo Chiquitto @ 2011-03-30 16:19 UTC (permalink / raw)
  To: autofs

[-- Attachment #1: Type: text/plain, Size: 1518 bytes --]

(note: I'm resending this because it apparently didn't reach the mailing list,
sorry if someone is getting it twice)

Hello,

After the update to 2.6.38, I noticed that AutoFS started to mount volumes
at times it normally wouldn't. More specifically, "ls -la" inside an AutoFS
mount point will trigger the mount of all available maps.

This can be reproduced with a simple indirect mount setup:

# cat /etc/auto.master
/data   /etc/auto.data

# cat /etc/auto.data
isos    -fstype=nfs4,ro,rsize=8192,wsize=8192,intr,nolock,nosuid libre:/isos

# egrep '(autofs|nfs4)' /proc/mounts
/etc/auto.data /data autofs rw,relatime,fd=7,pgrp=4300,timeout=600,minproto=5,\
 maxproto=5,indirect 0 0

# stat -L /data/isos > /dev/null

# egrep '(autofs|nfs4)' /proc/mounts
/etc/auto.data /data autofs rw,relatime,fd=7,pgrp=4300,timeout=600,minproto=5,\
 maxproto=5,indirect 0 0
libre:/isos /data/isos nfs4 ro,nosuid,relatime,vers=4,(.. more mount\
options ..) 0 0

Bisecting the changes between 2.6.37 and 2.6.38, I found that 2.6.38-rc1
exhibits the new behavior already. I went as near 2.6.37 as I could and verified
that commit b650c858c2 (autofs4: Merge the remaining dentry ops tables) also
shows the new behavior. I tried to bisect the remaining ~18 commits
but everything I tested/built ended up unbootable.

I also tested mainline and verified that the problem is still there.

Although everything points to a kernel change, I'm attaching debug logs from
the automounter, just in case it's useful to someone.

Thanks,
Leonardo

[-- Attachment #2: messages-n63.txt --]
[-- Type: text/plain, Size: 3671 bytes --]

=== STARTUP

Mar 28 19:30:43 n63 automount[4389]: Starting automounter version 5.0.5, master map auto.master
Mar 28 19:30:43 n63 automount[4389]: using kernel protocol version 5.02
Mar 28 19:30:43 n63 automount[4389]: lookup_nss_read_master: reading master files auto.master
Mar 28 19:30:43 n63 automount[4389]: parse_init: parse(sun): init gathered global options: (null)
Mar 28 19:30:43 n63 automount[4389]: lookup_read_master: lookup(file): read entry /data
Mar 28 19:30:43 n63 automount[4389]: master_do_mount: mounting /data
Mar 28 19:30:43 n63 automount[4389]: automount_path_to_fifo: fifo name /var/run/autofs.fifo-data
Mar 28 19:30:43 n63 automount[4389]: lookup_nss_read_map: reading map file /etc/auto.data
Mar 28 19:30:43 n63 automount[4389]: parse_init: parse(sun): init gathered global options: (null)
Mar 28 19:30:43 n63 automount[4389]: mounted indirect on /data with timeout 600, freq 150 seconds
Mar 28 19:30:43 n63 automount[4389]: st_ready: st_ready(): state = 0 path /data
Mar 28 19:30:43 n63 automount[4389]: ghosting enabled

=== COMMAND: stat -L /data/isos

Mar 28 19:31:18 n63 automount[4389]: handle_packet: type = 3
Mar 28 19:31:18 n63 automount[4389]: handle_packet_missing_indirect: token 1, name isos, request pid 4398
Mar 28 19:31:18 n63 automount[4389]: attempting to mount entry /data/isos
Mar 28 19:31:18 n63 automount[4389]: lookup_mount: lookup(file): looking up isos
Mar 28 19:31:18 n63 automount[4389]: lookup_mount: lookup(file): isos -> -fstype=nfs4,ro,rsize=8192,wsize=8192,intr,nolock,nosuid libre:/isos
Mar 28 19:31:18 n63 automount[4389]: parse_mount: parse(sun): expanded entry: -fstype=nfs4,ro,rsize=8192,wsize=8192,intr,nolock,nosuid libre:/isos
Mar 28 19:31:18 n63 automount[4389]: parse_mount: parse(sun): gathered options: fstype=nfs4,ro,rsize=8192,wsize=8192,intr,nolock,nosuid
Mar 28 19:31:18 n63 automount[4389]: parse_mount: parse(sun): dequote("libre:/isos") -> libre:/isos
Mar 28 19:31:18 n63 automount[4389]: parse_mount: parse(sun): core of entry: options=fstype=nfs4,ro,rsize=8192,wsize=8192,intr,nolock,nosuid, loc=libre:/isos
Mar 28 19:31:18 n63 automount[4389]: sun_mount: parse(sun): mounting root /data, mountpoint isos, what libre:/isos, fstype nfs4, options ro,rsize=8192,wsize=8192,intr,nolock,nosuid
Mar 28 19:31:18 n63 automount[4389]: mount_mount: mount(nfs): root=/data name=isos what=libre:/isos, fstype=nfs4, options=ro,rsize=8192,wsize=8192,intr,nolock,nosuid
Mar 28 19:31:18 n63 automount[4389]: mount_mount: mount(nfs): nfs options="ro,rsize=8192,wsize=8192,intr,nolock,nosuid", nosymlink=0, ro=1
Mar 28 19:31:18 n63 automount[4389]: mount_mount: mount(nfs): calling mkdir_path /data/isos
Mar 28 19:31:18 n63 automount[4389]: mount_mount: mount(nfs): calling mount -t nfs4 -s -o ro,rsize=8192,wsize=8192,intr,nolock,nosuid libre:/isos /data/isos
Mar 28 19:31:18 n63 request-key: Cannot find command to construct key 33463049
Mar 28 19:31:18 n63 request-key: Cannot find command to construct key 481955300
Mar 28 19:31:18 n63 automount[4389]: mount_mount: mount(nfs): mounted libre:/isos on /data/isos
Mar 28 19:31:18 n63 automount[4389]: dev_ioctl_send_ready: token = 1
Mar 28 19:31:18 n63 automount[4389]: mounted /data/isos
Mar 28 19:31:18 n63 automount[4389]: st_readmap: state 1 path /data
Mar 28 19:31:18 n63 automount[4389]: re-reading map for /data
Mar 28 19:31:18 n63 automount[4389]: lookup_nss_read_map: reading map file /etc/auto.data
Mar 28 19:31:18 n63 automount[4389]: parse_init: parse(sun): init gathered global options: (null)
Mar 28 19:31:18 n63 automount[4389]: st_ready: st_ready(): state = 4 path /data
Mar 28 19:31:21 n63 dhclient: XMT: Solicit on eth0, interval 113240ms.


[-- Attachment #3: Type: text/plain, Size: 140 bytes --]

_______________________________________________
autofs mailing list
autofs@linux.kernel.org
http://linux.kernel.org/mailman/listinfo/autofs

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2013-03-27  4:06 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-28 22:53 stat -L triggering mount (behavior change starting with 2.6.38-rc1) Leonardo Chiquitto
2011-04-01  4:27 ` Ian Kent
2011-04-01  4:55   ` Ian Kent
2011-04-01  9:19   ` David Howells
2011-04-01 12:20     ` Leonardo Chiquitto
2011-04-01 14:27       ` David Howells
2011-08-03 14:16         ` Leonardo Chiquitto
2011-04-01  4:38 ` Ian Kent
2011-04-01 12:13   ` Leonardo Chiquitto
2013-03-26 12:56 ` toto
2013-03-26 20:41   ` Leonardo Chiquitto
2013-03-27  0:13     ` Guillaume Apostoly
2013-03-27  4:06     ` Ian Kent
  -- strict thread matches above, loose matches on Subject: below --
2011-03-30 16:19 Leonardo Chiquitto

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.