Skip site navigation (1)Skip section navigation (2)
Date:      02 Feb 1995 12:50:43 GMT
From:      njw@sarc.city.ac.uk (unknown)
To:        citycs-list-freebsd-hackers@cs.city.ac.uk
Subject:   Re: Am I dreaming?
Message-ID:  <NJW.95Feb2125044@ghost.sarc.city.ac.uk>
In-Reply-To: "Jordan K. Hubbard"'s message of 2 Feb 1995 06:46:46 -0000
References:  <3gpv4m$5hf@bambam.cs.city.ac.uk>

next in thread | previous in thread | raw e-mail | index | archive | help

In article <3gpv4m$5hf@bambam.cs.city.ac.uk> "Jordan K. Hubbard" <jkh@FreeBSD.org> writes:

>   I think the question was more one of how it get its mitts on user
>   requests for files that aren't currently mounted.

Amd mounts itself into the fs namespace as an NFS server.  Whenever
the filesystem hits the mountpoint, it sends the request off to the
registered NFS server (amd) asking for a filehandle.  Amd then does
magic and returns the filehandle, or a code like ENOENT.  The magic is
basically: if amd has already got an idea of what to do with the file,
then it can return the filehandle straight away.  If, however, the
amdmap resolves to a filesystem not currently mounted, amd forks off a
new process to do the mount (ensuring the master doesn't get blocked
on remote NFS requests).  It mounts the new filesystem into a
semi-private area of the filesystem (designed in such a way as to
prevent processes from hanging in NFS waits due to the awful but
mostly neccessary implementation of getcwd()) and then returns a
filehandle which is a symlink into the real mountpoint.  To ensure
things work as expected, amd continually sends NFS no-op RPCs (in
effect, pings) to each of the fileservers in use to determine their
"upness".  Based on it's knowledge of whether or not a fileserver is
up, amd can also return ENOENT to a file if, in theory it's available,
but in reality the server is dead.  In this case, it can also use any
alternative fileservers specified in the mountmap.

There you go.



-- 
Web: http://web.cs.city.ac.uk/finger/njw
E-mail: njw@sarc.city.ac.uk (MIME and ATK)
Work Telephone: +44 71 477 8551
Work Fax: +44 71 477 8587



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?NJW.95Feb2125044>