From: Phil Dumont <phil@solidstatescientific.com>
To: autofs@linux.kernel.org
Subject: Should stat(2)ing an automount mount point trigger the automount?
Date: Fri, 22 May 2009 13:42:49 -0400 (EDT) [thread overview]
Message-ID: <67349.32791243014169920.JavaMail.root@zimbra.solidstatescientific.com> (raw)
On a CentOS 5.4 installation, I ran this command:
find /net/fs/export/vtrak3b/keeper/
...and it yielded this message to stderr:
find: WARNING: Hard link count is wrong for /net/fs/export/vtrak3b/keeper/: this may be a bug in your filesystem driver. Automatically turning on find's -noleaf option. Earlier results may have failed to include directories that should have been searched.
Apparently, as soon as you access /net/host, if host is exporting
any paths other than /, the automount daemon will create a mount
point /net/host/path/to/export for every path exported by host,
but doesn't actually mount anything until you read the
exported/automounted directory. (The host 'fs' is exporting
/export/vtrak3b/keeper, along with some other non-root
directories.)
And it would seem that stat(2)ing the mount point does not
trigger the automount, so the stat(2) reports on the mount
point, not the directory that's going to be mounted there.
It would seem that find stat(2)s a directory before it opendir(3)s
it. So the stat(2) of keeper saw a hard link count of 2 (which is
correct for the empty mount point), but when find started reading the
directory, that triggered the automount, and it was now accessing the
mounted directory instead of the mount point, and apparently noticed
the discrepancy.
I've already entered a bug report against find, requesting that
it open the directory before stat-ing it:
http://savannah.gnu.org/bugs/?26641
But the bug might arguably be with automount. Should a stat
of the mount point trigger the automount?
phil dumont
next reply other threads:[~2009-05-22 17:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-22 17:42 Phil Dumont [this message]
2009-05-25 5:11 ` Should stat(2)ing an automount mount point trigger the automount? Ian Kent
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=67349.32791243014169920.JavaMail.root@zimbra.solidstatescientific.com \
--to=phil@solidstatescientific.com \
--cc=autofs@linux.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.