Date: Sat, 20 Nov 1999 23:01:51 -0700 From: Wes Peters <wes@softweyr.com> To: Assar Westerlund <assar@sics.se> Cc: "Daniel C. Sobral" <dcs@newsguy.com>, hackers@FreeBSD.ORG Subject: Re: Portable way to compare struct stat's? Message-ID: <38378ACF.277A81DC@softweyr.com> References: <XFMail.991118185611.jdp@polstra.com> <3836DF98.9A84EC44@newsguy.com> <3836F873.D3B989FE@softweyr.com> <3836FF7C.2D8236AE@newsguy.com> <38376544.96B017E9@softweyr.com> <5ln1s88o4y.fsf@foo.sics.se>
next in thread | previous in thread | raw e-mail | index | archive | help
Assar Westerlund wrote:
>
> Wes Peters <wes@softweyr.com> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?38378ACF.277A81DC>
