From owner-freebsd-hackers@FreeBSD.ORG Tue Sep 6 15:05:56 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7763616A41F; Tue, 6 Sep 2005 15:05:56 +0000 (GMT) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.FreeBSD.org (Postfix) with ESMTP id 04A2B43D45; Tue, 6 Sep 2005 15:05:55 +0000 (GMT) (envelope-from des@des.no) Received: from tim.des.no (localhost [127.0.0.1]) by spam.des.no (Postfix) with ESMTP id D0A2761D3; Tue, 6 Sep 2005 17:05:38 +0200 (CEST) Received: from xps.des.no (des.no [80.203.228.37]) by tim.des.no (Postfix) with ESMTP id AF57061D2; Tue, 6 Sep 2005 17:05:38 +0200 (CEST) Received: by xps.des.no (Postfix, from userid 1001) id E27FF33DA1; Tue, 6 Sep 2005 17:05:48 +0200 (CEST) To: Igor Shmukler References: From: des@des.no (=?iso-8859-1?q?Dag-Erling_Sm=F8rgrav?=) Date: Tue, 06 Sep 2005 17:05:48 +0200 In-Reply-To: (Igor Shmukler's message of "Tue, 06 Sep 2005 18:50:38 +0400") Message-ID: <868xyack37.fsf@xps.des.no> User-Agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam-Tests: ALL_TRUSTED,AWL,BAYES_00 X-Spam-Learn: ham X-Spam-Score: -5.2/3.0 X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on tim.des.no Cc: freebsd-hackers@freebsd.org, Robert Watson , Sergey Uvarov Subject: Re: vn_fullpath() again X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Sep 2005 15:05:56 -0000 Igor Shmukler writes: > Dag-Erling Sm=F8rgrav writes: > > Igor Shmukler 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