home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / std_unix / volume.23 / text0021.txt < prev    next >
Encoding:
Text File  |  1991-06-15  |  12.5 KB  |  257 lines

  1. Submitted-by: pc@hillside.co.uk (Peter Collinson)
  2.  
  3. An Update on UNIX-Related Standards
  4.  
  5. ANSI X3B11.1: WORM File Systems
  6.  
  7. USENIX Standards Watchdog Committee
  8. Jeffrey S. Haemer <jsh@usenix.org>, Report Editor
  9.  
  10.  
  11. March 26, 1991
  12.  
  13.  
  14. Andrew Hume <andrew@research.att.com> reports on the January 22-24, 1991
  15. meeting in Murray Hill, NJ:
  16.  
  17. Introduction
  18.  
  19. X3B11.1 is working on a standard for file interchange on write-once
  20. media (both sequential and non-sequential, i.e., random access): a
  21. portable file system for WORMs.  First let me apologize for laggardly
  22. snitching; we have had an extra meeting (in December) to accelerate our
  23. progress with the draft proposal and I have been busy writing a
  24. programmer's guide to the draft proposal.  I shall describe the results
  25. of the last three meetings, October (Nashua, NH), December (Murray
  26. Hill, NJ), and January (San Jose, CA), not in chronological order, but
  27. rather as a summary of where we are now.  Although many details remain
  28. to be ironed out, we have broad agreement on the current proposal.
  29.  
  30. Multi-volume file systems
  31.  
  32. The draft proposal supports multi-volume file systems.  To avoid the
  33. confusion that reigned at our meetings, I will define what this means.
  34. A volume is a logical address space (on some medium).  Thus, a typical
  35. WORM disk is two volumes, as each side is addressed separately.  A
  36. volume partition is simply a contiguous subset of a volume's address
  37. space.  A logical volume is simply a set of (volume) partitions upon
  38. which a file system is recorded.  Finally, a logical volume set is a
  39. set of volumes with a single volume set identifier.  (That is, it is
  40. simply a publishing concept.) Note, however, that when I say file
  41. system, I mean a set of files and directories described by possibly
  42. multiple directory hierarchies (typically each would be in a different
  43. character set).  The (logical) block size, not the physical sector
  44. size, is $2 sup i$ bytes, $ 9<=i<65536$, and implementations would
  45. have to support at least a block size of 64KB.  The various size
  46. limits are generous; internal block addresses allow 64K volumes, 64K
  47. partitions per volume, and $2 sup 32$ blocks per partition.
  48.  
  49. Volume Headers
  50.  
  51. The location of the volume header (the analog of the superblock) is a
  52. tricky issue because of the requirement that systems be able to boot
  53. off a disk in our format and there is simply no consensus on the size
  54. or location of the boot area.  Accordingly, pointers to the volume
  55. header (actually a sequence of various descriptor records) are
  56. recorded at one or more of 0, 16, 64, 128, 192, 256, $N - 16$, $N - 4$
  57. (where $N$ is the size of the disk).  The seek speed (or rather the
  58. lack of seek speed) of WORM disks encouraged us to put these at both
  59. ends of the disk.  The volume header record, like all the other major
  60. control structures, has a 16-bit CRC and a unique 8-byte tag, which
  61. should prevent misrecognition.
  62.  
  63. Volume/Partition Structure
  64.  
  65. The volume layer handles space allocation for the volume, definitions
  66. of partitions, and bad-block mapping.  The partition layer does its own
  67. space allocation, supports the file system, and does partition-access
  68. logging.  Partitions have file-system-type tags; the intent is to allow
  69. partition $w$ to be an X3B11.1 file system, partition $x$ to be a CDROM
  70. file system, partition $y$ to be an MS-DOS floppy file system and
  71. partition $z$ to be of unknown type.  There should be a registry for
  72. this type field; vendors may want to register their file-system
  73. formats.
  74.  
  75. Bad-Block Handling
  76.  
  77. A simple defect-management scheme has been adopted; it is similar to
  78. the bad-block remapping scheme used for most SMD disks.  There was
  79. considerable resistance to such a scheme, particularly from the
  80. representatives of the hardware vendors, as the (SCSI) WORM disks
  81. already do as much error detection/correction as is possible.  However,
  82. defect management (above the disk driver level) is still necessary
  83. because
  84.  
  85.   1.  error correction/detection in the drive can, and for performance
  86.       reasons often is, turned off,
  87.  
  88.   2.  errors can easily occur between the disk and the host's main
  89.       memory (have you ever heard of DMA or bus errors?), and
  90.  
  91.   3.  even though SCSI disks present an ``error free'' interface, most
  92.       drives have a limited number of errors they can cope with, and
  93.       many early drives did little or no error correction.
  94.  
  95. FCB Format
  96.  
  97. As you may recall, multiple versions of the direct entry (the
  98. equivalent of the inode) are stored in a data structure called the
  99. file control block (FCB).  The original proposal involved various
  100. levels of indirect blocks exactly like classic Unix file systems.  We
  101. adopted my proposal (adapted from an observation by Dennis Ritchie)
  102. for a simpler, more general format that allows arbitrary structures,
  103. which can be specialized for different applications.
  104.  
  105. Partition Access Records
  106.  
  107. This is more like logging changes to the file system than a security
  108. thing like access control lists.  The idea is to have periods of
  109. writing to the partition bracketed by specific control records so that
  110. it will be possible to tell if a system closed out that partition
  111. gracefully.  (More bluntly, did we unmount the partition gracefully or
  112. did the system crash in the middle of a session?) These records are
  113. kept on a per- file-system basis and are recorded as variants of
  114. direct entries in a structure identical to FCBs.  Another side issue
  115. is support for a so called ``stable'' record, which is analogous to
  116. the proposed stable sync feature of BSD Unix.  (The control structures
  117. such as inodes and indirect blocks are written to disk but the user's
  118. data may not be, yet.) This peculiar state avoids the need to run fsck
  119. (or its equivalent) on the disk but you still have to get the user's
  120. data from somewhere.  [Ed: does anyone really need this ``stable''
  121. state?]
  122.  
  123. Recording Directories
  124.  
  125. For performance reasons, it is proposed that directories, or rather the
  126. records (FIDS) identifying the files (and subdirectories) in that
  127. directory, be kept in optionally sorted order.  This would be in binary
  128. and not lexicographic order (thus evading nettlesome character-set-
  129. collating-order issues).  It is not trivial to support this but is
  130. probably worth it.  Related to this is the issue of system areas in
  131. directories and FIDs.  It is expected that these areas will contain
  132. accelerator structures, such as B-tree indices and so on.  Here, and
  133. elsewhere in the standard, the governing principle is to allow systems
  134. to use such structures but to neither mandate nor standardize their
  135. use.
  136.  
  137. Anonymous Files
  138.  
  139. There are numerous FCBs, or file-like objects, that have no FID.  An
  140. example might be a Macintosh resource fork.  The question is whether to
  141. make these visible to the user.  This is a serious issue, and one not
  142. confined to this standard.  It is an issue for the system supporting
  143. access to the file system on the disk.  Do we rely on this system to do
  144. the right thing or should we mandate a mechanism?  For example, take
  145. the example of a Macintosh file (with its resource fork) on a system
  146. (say Unix) that doesn't have that concept.  We can either trust that
  147. the vendor supplying your Unix has implemented an fcntl (or ioctl) to
  148. access the resource fork, or we can evade the issue completely by
  149. mandating that the resource fork be available for normal access by a
  150. reserved name such as foo.RFORK.  The general feeling is that users
  151. will not allow a standard to reserve parts of the file name space for
  152. its own use.  Thus, it seems likely that access would have to be via
  153. standardized fcntl calls, but these are outside the scope of our
  154. standard.
  155.  
  156. Byte Order
  157.  
  158. I have pressed the issue of the byte order for numeric fields.  The
  159. previous notion was to allow the recording system to choose the byte
  160. order.  The issue is not technical (everyone seems happy to pick just
  161. one and stick with it) but political.  We picked LSB order: the order
  162. used by the low-end (and slowest) systems.  We measured the performance
  163. degradation for low-end MSB systems (the slowest Macintosh we could
  164. find), and the CPU cost of straightforward C code.  Interpreting the
  165. byte order for the worst case (a block of integer block numbers) was
  166. about 10ms - comparable to doing a single disk I/O and one or two
  167. orders of magnitude less than the cost of doing a disk seek.  (Careful
  168. assembly code would be much faster than this.)
  169.  
  170. Extended Attributes
  171.  
  172. The direct entry for a file has many attributes or fields.  Some of
  173. these will be faster to access and be stored directly in the direct
  174. entry.  The rest will be stored in an extended attribute record area
  175. much like resources in a Macintosh resource fork.  There are two
  176. issues:  which attributes get faster access and how do you access the
  177. other attributes?  The former is something the standard specifies; our
  178. guiding principle was to include the fields needed for a Unix stat or
  179. an MS-DOS (or VMS) dir command.  Unfortunately, the issue of access is
  180. beyond the domain of our standard and needs to be addressed by POSIX,
  181. probably best by 1003.8.  Internally within our standard, the extended
  182. attributes are identified by a 32-bit number, some of which are set in
  183. the standard and the rest by a registry maintained by some authority
  184. (like ANSI).  The current list of extended attributes is given below;
  185. treat it as very preliminary and subject to change.
  186.  
  187.      information creation         file abstract
  188.      information modification     file type
  189.      information expiration       associated file
  190.      information effective        data compression
  191.      file creation                protection
  192.      file access                  application-specific data segment
  193.      file modification            implementation segment
  194.      file backup                  escape sequences segment
  195.      file expiration              action history
  196.      file attribute               icon
  197.      file effective               environment type
  198.  
  199. Character Sets
  200.  
  201. We have adopted a somewhat simpler way of dealing with character sets
  202. than the CD-ROM standard (ISO 9660).  The current schemes available are
  203.  ----------------------------------------------------------------------
  204. |   0|   0-9A-Z . from Latin-1 (ISO 8859-1),                          |
  205. |   1|   portable filename character set 0-9A-Za-z .- (POSIX 1003.1), |
  206. |   2|   $G sub 0$ set from Latin-1,                                  |
  207. |   3|   all graphic characters from Latin-1, and                     |
  208. | 255|   defined via escape sequences - the full scale mechanisms     |
  209. |    |    of ISO 2022, which are only rarely implemented.             |
  210.  ----------------------------------------------------------------------
  211.  
  212. International Activity
  213.  
  214. The appropriate ISO committee (SC15) has been reconstituted with Japan
  215. supplying secretariat duties.  A meeting is expected in July or
  216. September and it is hoped that there will be close cooperation between
  217. X3B11.1 and SC15.  There is some concern that ANSI might awaken the
  218. long-dormant file structure committee and that this might delay
  219. acceptance of X3B11.1's work.  Also, because of a request by a working
  220. group involved in the Philips CD-WO device (a combination medium that
  221. is a 5.25in WORM with a CD-ROM portion), ECMA might also reconstitute
  222. its file structure committee (TC15).
  223.  
  224. Finale
  225.  
  226. What can, or should, you do?  As always, I welcome any feedback,
  227. specific or general on the work our committee does.  (I must express my
  228. appreciation to USENIX for publishing these reports; nearly all the
  229. mail I have received about X3B11.1's work starts off like, ``I read
  230. your report in the so-and-so login;''.) In particular, I invite
  231. comments on any fields or attributes you would like standardized and -
  232. perhaps more important to the Unix community - how to access auxiliary
  233. information about a file in a standard way.  Plenty of ad hoc
  234. solutions already exist for the cases of versioned files (VMS file
  235. systems on Ultrix systems), Macintosh files mounted as NFS file
  236. systems, and CD-ROM file systems.  The number of these problems will
  237. certainly increase over time; we need to address the solutions now
  238. before we standardize on file system interfaces (such as 1003.8) that
  239. omit such mechanisms.
  240.  
  241. If you would like more details on X3B11.1's work, you should contact
  242. either me (andrew@research.att.com, (908) 582-6262) or the committee
  243. chair, Ed Beshore (edb@hpgrla.hp.com).  I think the two most useful
  244. documents are the current draft of the working paper (about 80 pages)
  245. and a programmer's guide to the draft (about 12 pages written by me).
  246. I will send you copies of the latter document; requests for other
  247. documents or more general inquiries about X3B11.1's work would be best
  248. sent to Ed Beshore.
  249.  
  250. The next meeting is in North Falmouth, MA on April 23-26, 1991.  Anyone
  251. interested in attending should contact either me or Ed Beshore.
  252.  
  253.  
  254.  
  255. Volume-Number: Volume 23, Number 22
  256.  
  257.