From owner-freebsd-hackers Sat Nov 20 22: 1:57 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from mail.xmission.com (mail.xmission.com [198.60.22.22]) by hub.freebsd.org (Postfix) with ESMTP id 13FC514C1B for ; Sat, 20 Nov 1999 22:01:54 -0800 (PST) (envelope-from wes@softweyr.com) Received: from [204.68.178.39] (helo=softweyr.com) by mail.xmission.com with esmtp (Exim 2.12 #2) id 11pQ4O-0007mt-00; Sat, 20 Nov 1999 23:01:53 -0700 Message-ID: <38378ACF.277A81DC@softweyr.com> Date: Sat, 20 Nov 1999 23:01:51 -0700 From: Wes Peters Organization: Softweyr LLC X-Mailer: Mozilla 4.7 [en] (X11; U; FreeBSD 3.1-RELEASE i386) X-Accept-Language: en MIME-Version: 1.0 To: Assar Westerlund Cc: "Daniel C. Sobral" , hackers@FreeBSD.ORG Subject: Re: Portable way to compare struct stat's? References: <3836DF98.9A84EC44@newsguy.com> <3836F873.D3B989FE@softweyr.com> <3836FF7C.2D8236AE@newsguy.com> <38376544.96B017E9@softweyr.com> <5ln1s88o4y.fsf@foo.sics.se> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Assar Westerlund wrote: > > Wes Peters writes: > > "Daniel C. Sobral" wrote: > > > > > > Just to expand a little bit more, some distributed filesystems *do > > > not* have a unique identifier like the inode. > > > > So then the FreeBSD client software should create one? Do they just assign > > a random number as the st_ino when stat'ing the file? > > If there's none, you of course have to create one. As long as you > keep giving the same `va_fileid' to the same file (by remembering what > files you have seen), I guess that's ok. But then I don't know of any > distributed filesystem that acts this way (what's `same' in the text > above?). What filesystems are like that? > > Looking at some existing file systems: > > NFS - the server returns a 32-bit file-ID The only one I had available, which didn't look like a problem. > AFS/Arla - files are identified by (cell, volume, vnode, > uniquifier) which is hashed down to a 32 bit fileno > Coda - same as AFS/Arla Are hash collisions handled reasonably? I.e. does the test for st_dev/ st_ino uniquely identifying the file during an entire single mount session hold true? If so, no problem. If not, I can name at least one popular security manager program that is going to have a conniption fit. ;^) -- "Where am I, and what am I doing in this handbasket?" Wes Peters Softweyr LLC wes@softweyr.com http://softweyr.com/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message