Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 07 Apr 1998 22:48:30 +0200
From:      Poul-Henning Kamp <phk@critter.freebsd.dk>
To:        Mika Nystrom <mika@cs.caltech.edu>
Cc:        jkh@time.cdrom.com, freebsd-bugs@FreeBSD.ORG
Subject:   Re: kern/6189 
Message-ID:  <273.891982110@critter.freebsd.dk>
In-Reply-To: Your message of "Mon, 06 Apr 1998 23:51:38 PDT." <199804070651.XAA27474@varese.cs.caltech.edu> 

next in thread | previous in thread | raw e-mail | index | archive | help
In message <199804070651.XAA27474@varese.cs.caltech.edu>, Mika Nystrom writes:
>I'd love to see this reply too.. :)
>What I am seeing now is that for six seconds (as far as I can tell
>no more nor less) after an automounted filesystem has been umounted,
>the kernel does not realize that it is in fact possible to try again
>through amd, but instead returns a "file not found" error

The fundamental issue here is that UNIX in general belives that
nobody else mucks about with the filesystems.  If we have the vnode
in the kernel, the file is still there.

The trouble is that amd "optimizes" things by mounting the filesystem
and "faking" a symlink.  If amd acted like a proxy for this, ie, the
amd'ed filesystem never got mounted directly, you would not have the
problem.

The timeout for amd to unmount is normally orders of magnitude
larger than 6 seconds, which bypasses this problem.  You must be
doing something weird here since you hit this one.  Maybe because
your checking the links existence keeps refreshing it.  If you
unmount by hand, you get what you can expect.  Amd bases its
unmounting on lack of activity, if you pull the rug by hand, weird
things are to be expected.

There are no easy solutions which doesn't cost dearly in performance.
There are some very hard solutions which are only expensive in performance.

You could string all resolved symlinks in the namecache on a destination
filesystem list and yank them all at umount time.  I think that would
cost another 8 bytes in the vnode, which is rather much to pay for this.

--
Poul-Henning Kamp             FreeBSD coreteam member
phk@FreeBSD.ORG               "Real hackers run -current on their laptop."
"Drink MONO-tonic, it goes down but it will NEVER come back up!"

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message



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