At 12:04 PM -0700 12/1/99, Wes Peters wrote:
> > >> On a single system, if st_dev and st_ino are equal, you must be
> > >> referring to the same object. If not, I'd like to hear about it.
> > >
> > >This assumption has always caused lots of pain and suffering for
> > >distributed file system people -- in a distributed file system, the
> > >requirement that you can generate a unique 32 bit number for each file
> > >or directory visible in the FS is a fairly arduous one. Either...
>
>Perhaps we simply need to expand the size of ino_t and carefully convert
>smaller types to it in the stat call?
In the case of AFS, I think you'd want to expand the size of st_dev.
All files in an AFS volume are "one device", I would think. If the
"device" is gone (ie, the volume is not mounted), then all files in
that "device" (volume) will not be available.
I don't know what would be best for other distributed file systems,
though. Maybe both variables would have to increase in size. Maybe
we should start by creating an "fcompare()" routine, which you'd
pass two file descriptors to and it would say if they're the same
file. Initially that routine could just do two fstat()'s, and
compare st_dev and st_ino. We could then expand it to do better
comparisons for other file-systems.
That's only a partial solution, of course, but I imagine it would
be pretty tricky to change the field-sizes for st_dev and st_ino
in the stat structure without breaking lots of things...
---
Garance Alistair Drosehn = [EMAIL PROTECTED]
Senior Systems Programmer or [EMAIL PROTECTED]
Rensselaer Polytechnic Institute
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message