From: Mike Waychison <mike@waychison.com>
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: raven@themaw.net, linux-fsdevel@vger.kernel.org,
jamie@shareable.org, viro@parcelfarce.linux.theplanet.co.uk
Subject: Re: [RFC][PATCH 1/8] namespace: use global namespace semaphore
Date: Tue, 31 May 2005 11:43:21 -0400 [thread overview]
Message-ID: <429C8619.5010301@waychison.com> (raw)
In-Reply-To: <E1Dd3kn-0002KS-00@dorka.pomaz.szeredi.hu>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Miklos Szeredi wrote:
>> - this triggers the actual mount in the daemon, which mounts over
>> the autofs filesystem (with some trick to avoid recursion)
>
>
> BTW, there's an elegant way to avoid recursion:
>
> - _before_ mounting the autofs, do mpfd = open(mountpoint, O_RDONLY).
>
> - then mount autofs
>
> - when mount trigger comes in do: fchdir(mpfd), mount whatever .
>
> This way the autofs mount won't be followed by the mount program,
> since looking up '.' does not follow mounts.
>
> So the result is two sibling mounts: the original autofs and the
> actual filesystem. But subsequent lookups will see the later mount
> only, since it's placed earlier on the hash chain, and lookup_mnt() will
> always return that.
Indeed. This is how autofsng handles direct mounts and 'browse' mounts
currently, although it currently uses mountfds to do a move in the end
(avoiding having to hijack cwd to do the final move). This could be
better achieved by mount --move'ing to /proc/self/fd/#.
Mike Waychison
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFCnIYZdQs4kOxk3/MRAskPAJ9kAXkVsCu9GKtliB5O5otVmbVb7QCePbxy
xMst1n+X3kGvWmJrUr1Je+0=
=WKDP
-----END PGP SIGNATURE-----
next prev parent reply other threads:[~2005-05-31 15:45 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-30 13:19 [RFC][PATCH 1/8] namespace: use global namespace semaphore Miklos Szeredi
2005-05-31 2:58 ` Ian Kent
2005-05-31 3:23 ` Mike Waychison
2005-05-31 7:02 ` Ian Kent
2005-05-31 7:56 ` Miklos Szeredi
2005-05-31 9:34 ` Ian Kent
2005-05-31 10:05 ` Miklos Szeredi
2005-05-31 10:13 ` Miklos Szeredi
2005-05-31 15:43 ` Mike Waychison [this message]
2005-06-01 5:04 ` Ian Kent
2005-06-01 8:35 ` Miklos Szeredi
2005-06-03 2:10 ` Ian Kent
2005-06-03 5:28 ` Miklos Szeredi
2005-06-04 4:13 ` raven
2005-06-04 6:32 ` Miklos Szeredi
2005-06-04 6:50 ` raven
2005-06-04 7:20 ` Miklos Szeredi
2005-06-04 7:27 ` raven
2005-06-03 17:22 ` Mike Waychison
2005-06-04 4:32 ` raven
2005-06-03 17:13 ` Mike Waychison
2005-06-03 18:20 ` Miklos Szeredi
2005-06-01 4:36 ` Ian Kent
2005-06-03 17:24 ` Mike Waychison
2005-06-04 4:38 ` raven
2005-05-31 15:55 ` Mike Waychison
2005-05-31 16:08 ` Miklos Szeredi
2005-06-01 4:18 ` Ian Kent
2005-06-01 8:28 ` Miklos Szeredi
2005-06-03 2:23 ` Ian Kent
2005-06-03 5:18 ` Miklos Szeredi
2005-06-04 4:53 ` raven
2005-06-04 6:57 ` Miklos Szeredi
2005-06-04 7:13 ` raven
2005-06-03 17:26 ` Mike Waychison
2005-06-01 3:57 ` Ian Kent
2005-06-03 17:07 ` Mike Waychison
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=429C8619.5010301@waychison.com \
--to=mike@waychison.com \
--cc=jamie@shareable.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=miklos@szeredi.hu \
--cc=raven@themaw.net \
--cc=viro@parcelfarce.linux.theplanet.co.uk \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).