home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / std_unix / volume.11 / text0049.txt < prev    next >
Encoding:
Internet Message Format  |  1987-07-18  |  3.4 KB

  1. From: MIKEMAC%UNBMVS1.BITNET@wiscvm.wisc.edu (Michael MacDonald)
  2.  
  3.     I have just finished working on a CPIO tape reader and approx 1 year
  4. ago a TAR tape reader for our IBM3090 180/vf running MVS/XA.
  5.  
  6.    The following comments may be of interest as they come from a slightly
  7. different point of view. I do not have significant *ix experience and
  8. the following comments come as a result of trying to pick apart these tapes
  9. when they are used for data interchange.
  10.  
  11.    TAR and CPIO are *used* for purposes of backup AND data interchange.
  12.  
  13.    TAR Format comments.
  14.        1)  Data is written as blocks of 512 bytes. This allows for faster
  15.            processing and this is important for BIG files.
  16. [ Most implementations allow using tape blocks larger than that.  -mod ]
  17.        2)  There is room left in the header. This allows for customization
  18.            by a site while still allowing other sites to read the tape
  19.            without using the customized version (if they do it right).
  20.        3)  The length of the NAME and the LINKNAME field is not enough.
  21.            Extending the length to 256 would extend the header to 2 blocks
  22.            but I think that extending the length outweighs the disadvantages.
  23. [ In addition to
  24.  
  25. #define NAMSIZ    100
  26.     char    name[NAMSIZ];
  27.  
  28. POSIX Section 10.1 also has
  29.  
  30. #define PFXSIZ    155
  31.     char    prefix[PFXSIZ];
  32.  
  33. which is used when name isn't big enough.  The total of the two is set
  34. to match the minimum permissible value of PATH_MAX.  -mod ]
  35.        4)  All of the tape drives that I have worked with (not that many)
  36.            are capable of writing a short block. If TAR would recognize
  37.            a physical end of file rather than two blocks of hex 00's.
  38.            This would solve a number of problems with TAR.
  39.        5)  Limited amount of Unix dependent information in the header.
  40.            If a *backup* system is used for data interchange is it really
  41.            necessary to add many Operating System dependent features.
  42.            Are the advantages gained by using these dependencies *really*
  43.            advantages even in a backup system?
  44.  
  45.    CPIO Format comments.
  46.         1)  Data is not block oriented. This slows down processing
  47.             considerably.
  48.         2)  There is no room left in the header. No customization
  49.             possible (without also sending the customized program).
  50.         3)  Is 128 that much better than 100? See TAR note 3.
  51.         4)  The CPIO end of file mark (TRAILER!!!) why not a physical EOF
  52.             See TAR note 4.
  53.         5)  When it comes to OS dependent information the CPIO header is
  54.             full of it.
  55.         6)  After writing the CPIO tape reader I came across a ?serious?
  56.             problem. (The following note is from the unix manual page cpio(4)
  57.             The h_name field is "h_namesize rounded to word" long. The
  58.             header must begin on a word boundary (although not documented).
  59.             The wordsize of the machine is not a CPIO option (as far as I can
  60.             tell). This means CPIO tapes cannot be read on a machine with
  61.             a different wordsize. I question if this "feature" should be
  62.             standardized without at least a wordsize option.
  63.  
  64.  Michael MacDonald
  65.  Software Specialist, School of Computer Science
  66.  University of New Brunswick
  67.  Po. Box 4400
  68.  Fredericton, New Brunswick
  69.  CANADA    E3B 5A3
  70.  
  71.  (506) 453-4566
  72.  
  73.  Netnorth/BITNET: MIKEMAC@UNB
  74.  
  75. Disclaimer: The opinions stated are mine, no one likes them around here either.
  76.  
  77. Volume-Number: Volume 11, Number 50
  78.  
  79.