On Wed, 24 Aug 2005, Dag-Erling Smørgrav wrote:
"Kamal R. Prasad" <[EMAIL PROTECTED]> writes:
So the question is, how do I get hold of pathname given
vnode*/(inode, devno, generation no) -without relying on the name
cache (on freebsd)?
You can't. The semantics of Unix file systems are such that the mapping
from file name to file is one-way. Furthermore, a file can be
associated with more than one file name, or even none at all (if it has
been unlinked but is still held open by a process).
In fact, there's another troublesome edge case -- different files can also
return the same name, if you have a way to generate names from linked
files, due to mountpoint covering. Covered vnodes can still be accessed
after the mount, if they have been opened, or if the cwd of a process is a
directory (other than the mountpoint vnode) of the covered file system,
and an identically named node can exist in the covering file system.
Robert N M Watson
_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"