Re: [autofs] [RFC] Towards a Modern Autofs

From: Mike Waychison
Date: Wed Jan 07 2004 - 16:06:41 EST


This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enig88C5FC4D8197CCE09971C435
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

H. Peter Anvin wrote:

>> Also when /home or other important fs are mounted via autofs there is
>> not much practical difference between a hung kernel and a hung
>> daemon. You have to reboot the system anyways.
>
>
> a) Guess which one is easier to debug?

When they may both equally hang your machine, neither.

> b) Do people around here really believe that putting things in the
> kernel magically makes them work right?
>

No magic involved.

When atomicity is needed wrt. mountpoints, moving the logic into the
kernel is a much simpler solution.

How much code was required to handle the corner cases and races in the
existing autofs implementations?

To put it into perspective, the I'm calling for the following major changes:

1) move expiry logic out of autofs and into the VFS where others can use
it and notice when it breaks when VFS internals change. For example, I
just noticed that autofs4 in 2.6 hasn't been updated to grab the new
vfsmount_lock instead of dcache_lock in certain circumstances.

2) move the loop that used to spin around and ask kernelspace if there
was anything to expire into the VFS as well, where it won't be killed.

3) introduce some way to let userspace walk the mountpoints using file
descriptors as references.

4) figure out a way to get super_blocks to clone so that we can have
some consistent automount functionality across cloned namespaces.

(1) and (2) shouldn't be hard at all to do considering David Howells has
done the majority of this already. (3) is needed in order to manage
direct mounts properly for when they are 'covered'. Admittedly, (4)
comes off as an ugly hack.

Also, (2) was the only 'active' task the automount daemon was doing.
Everything else it did can be rewritten in the form of a usermode helper
that runs only when it is needed. This simplifies the userspace code a lot.


--
Mike Waychison
Sun Microsystems, Inc.
1 (650) 352-5299 voice
1 (416) 202-8336 voice
mailto: Michael.Waychison@xxxxxxx
http://www.sun.com

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
NOTICE: The opinions expressed in this email are held by me,
and may not represent the views of Sun Microsystems, Inc.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

--------------enig88C5FC4D8197CCE09971C435
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)
Comment: Using GnuPG with Debian - http://enigmail.mozdev.org

iD8DBQE//HRtdQs4kOxk3/MRAuKUAKCdTS1FaYs9tgk2fOC99iQSp3wjWwCghCI6
0kxBJ9clEFTEucVc9bOLSfA=
=1bMG
-----END PGP SIGNATURE-----

--------------enig88C5FC4D8197CCE09971C435--

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/