From owner-freebsd-hackers Sat Nov 20 10: 7:25 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from peach.ocn.ne.jp (peach.ocn.ne.jp [210.145.254.87]) by hub.freebsd.org (Postfix) with ESMTP id 464D61577C for ; Sat, 20 Nov 1999 10:07:12 -0800 (PST) (envelope-from dcs@newsguy.com) Received: from newsguy.com (p11-dn03kiryunisiki.gunma.ocn.ne.jp [210.232.224.140]) by peach.ocn.ne.jp (8.9.1a/OCN) with ESMTP id DAA04648; Sun, 21 Nov 1999 03:06:59 +0900 (JST) Message-ID: <3836DF98.9A84EC44@newsguy.com> Date: Sun, 21 Nov 1999 02:51:20 +0900 From: "Daniel C. Sobral" X-Mailer: Mozilla 4.7 [en] (Win98; I) X-Accept-Language: en,pt-BR,ja MIME-Version: 1.0 To: John Polstra Cc: Garance A Drosihn , hackers@FreeBSD.ORG Subject: Re: Portable way to compare struct stat's? References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG John Polstra wrote: > > We must be interpreting the requirement differently, because it > doesn't seem onerous at all to me. The st_dev value needn't be the > same on two different hosts which both mount the same filesystem. I > also doubt that the requirement has to hold across remounts. Under > that interpretation, it's simple to meet the requirement. Just create > a locally-unique st_dev value whenever you mount a filesystem, and > if the filesystem is remote then record a mapping between (remote > hostname, remote host's idea of the "device") and the local st_dev > value. (I've never used AFS, so I may be missing something crucial > here.) You are assuming the fs is local to some place. It is not. It is distributed. Files might even migrate. So, the fs is at the same time local and foreign to all hosts mounting it. Anyway, st_dev+st_ino just don't give enough bits for a unique identifier. The example of AFS (?), where a globally unique identifier has 80 bits, is a good one. > Well, the POSIX requirement isn't optional. If a system doesn't > meet it then it is not POSIX-compliant. So any application that is > targeted toward POSIX systems is perfectly within its rights to rely > on the requirement. It was stated before that FreeBSD complies with POSIX except where POSIX is broken. Well, it's broken here. st_dev+st_ino *can't* work with modern, distributed filesystems (without undue overhead). -- Daniel C. Sobral (8-DCS) dcs@newsguy.com dcs@freebsd.org "Then again maybe not going to heaven would be a blessing. Relkin liked a certain amount of peace and harmony, since there'd been a pronounced shortage of them in his own life; however, nothing but peace and harmony, forever and forever? He wasn't sure about that. And no beer? Very dubious proposition." To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message