Subject: Re: kern/4099: Gather coredumps in one place
To: None <current-users@NetBSD.ORG>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: current-users
Date: 09/09/1997 15:33:05
I don't wish to comment on the idea that started this whole thread off.
But....

> The kernel does not keep around any string corresponding to what the
> pathname of a vnode might have been the last time it was looked up.
> This would be burdensome to keep, potentially expensive to generate,
> and very expensive to keep correct (unless you declare that you don't
> care if it's correct, in which case why maintain it at all?).

To answer the parenthetical question: there's a third possibility.
It's quite plausible that I care whether it's _usually_ correct but
that I'm willing to tolerate incorrectness _once in a while_.  If you
squirrel away a path for an vnode at each opportunity, I would guess
that in almost all cases, the path will remain correct for the life of
the vnode, and for many applications it's a hell of a lot better than
nothing, even if it is occasionally incorrect.  (Especially if you
update the saved path at every opportunity, so if it does become wrong,
it's corrected at the next chance.)

For that matter, you could squirrel away the path, then when you go to
log it, do a lookup and see whether it's still valid - and then log it
if so, or log something like (unavailable) if not.

I'm not advocating actually doing this; it really doesn't seem like a
very good idea to me.

					der Mouse

			       mouse@rodents.montreal.qc.ca
		     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B