home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / std_unix / volume.21 / text0174.txt < prev    next >
Encoding:
Text File  |  1990-10-26  |  2.1 KB  |  42 lines

  1. Submitted-by: jason@cnd.hp.com (Jason Zions)
  2.  
  3. Dominic Dunlop says:
  4.  
  5. > I dare say that, as more types of object appear in filename space (and
  6. > I, for one, should like to see them do so), the question of determining
  7. > uniqueness will become knottier.  Suppose, for example, that one used
  8. > filenames as handles for virtual circuits across a wide-area network.
  9. > Conceivably, the number of such circuits could be sufficiently large
  10. > that it will become difficult o shoe-horn a unique identifier into the
  11. > existing stat structure fields.  A problem for the future?
  12.  
  13. Actually, a problem for today. P1003.8 has to cope with the fact that a
  14. local file for major 0, minor 0x010100, inode 1234 is *different* from a
  15. file on some remote machine with the same (major,minor,inode) triplet. But
  16. adding a new field or fields to the stat structure isn't gonna work;
  17. expanding that structure will cause many implementations to shatter (i.e.
  18. break spectacularly). Just cobbling up a major number for some random
  19. remotely-mounted filesystem is unsatisfactory, unless the cobble is
  20. persistant over umount/mount operations. (An application starts to run;
  21. opens file1 on remsys, gets (maj,min,ino). Network goes down, comes up;
  22. system remounts remsys. App opens file2 on remsys. That major number had
  23. better be the same for remsys!)
  24.  
  25. What's needed is a simple routine which can be called to determine if two
  26. handles point to the same object. It would be nice if there was a routine
  27. which took as arguments a file handle and a path name and returned true iff
  28. the path referred to the same file. This routine would be guaranteed by the
  29. implementor to work for any file-system resident object provided for; e.g.
  30. an SVR4 implementation would have to be able to tell if a file opened via
  31. RFS referred to the same underlying file as one opened under NFS.
  32.  
  33. I don't know if that's sufficient, though; application programmers may be
  34. using the stat info for other purposes, and a remote_addr field might be a
  35. good idea. Once P1003.12 decides on a representation for an arbitrary
  36. network address, which might be considerably larger than an IP address.
  37.  
  38. Jason Zions
  39.  
  40. Volume-Number: Volume 21, Number 174
  41.  
  42.