Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 06 Sep 2005 17:05:48 +0200
From:      des@des.no (=?iso-8859-1?q?Dag-Erling_Sm=F8rgrav?=)
To:        Igor Shmukler <shmukler@mail.ru>
Cc:        freebsd-hackers@freebsd.org, Robert Watson <rwatson@FreeBSD.org>, Sergey Uvarov <uvarovsl@mail.pnpi.spb.ru>
Subject:   Re: vn_fullpath() again
Message-ID:  <868xyack37.fsf@xps.des.no>
In-Reply-To: <E1ECemU-0004dI-00.shmukler-mail-ru@f26.mail.ru> (Igor Shmukler's message of "Tue, 06 Sep 2005 18:50:38 %2B0400")
References:  <E1ECemU-0004dI-00.shmukler-mail-ru@f26.mail.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
Igor Shmukler <shmukler@mail.ru> writes:
> Dag-Erling Sm=F8rgrav <des@des.no> writes:
> > Igor Shmukler <shmukler@mail.ru> writes:
> > > You are correct about the Unix file system organization, but does it
> > > mean reliable vnode to fullname conversation is not possible?
> > Yes.  Get over it.
> Well, I do not think it is a Yes. I very much think it is a No. You
> should have continued reading my email 'til the middle or even
> farther.

I did.  You just don't get it.  A file may be associated with zero,
one or more names and none of these names are more correct or
authoritative than any of the others.  If a user does 'ln /bin/ls
/tmp' (assuming /bin and /tmp are on the same filesystem), it may be
obvious to you that /bin/ls is the "real name" is /tmp/ls is just an
alias, but it is not obvious to the kernel.  In fact, the kernel is
unable to see any difference at all between these two names.

Storing the name that was used to access a file in the vnode does not
solve anything, because the vnode is shared by all users of that file,
regardless of which name they used to access it, and there is no
guarantee that the name that was used to access a file two seconds ago
still references the same file, or any file at all; the file may have
been renamed or deleted, or a new filesystem may have been mounted
that covers the namespace that file was in.

In summary: THERE IS NO WAY TO UNIQUELY AND RELIABLY MAP A VNODE BACK
TO A NAME, and I wish people would stop insisting that there must be.
All the world is not MS-DOS.

DES
--=20
Dag-Erling Sm=F8rgrav - des@des.no




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