home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / std_unix / volume.20 / text0017.txt < prev    next >
Encoding:
Internet Message Format  |  1990-08-02  |  3.6 KB

  1. From:  guy@auspex.uucp (Guy Harris)
  2.  
  3. >I am interested in finding out the current state of standards efforts
  4. >in regards to tape drivers, specifically:
  5. >
  6. >Is there any standard ioctl interface to take advantage of the flexibility 
  7. >afforded by the SCSI interface?
  8.  
  9. There's a *de facto* semi-standard (as in "there are probably retrograde
  10. systems that do it differently but no better, and are definitely systems
  11. that don't do it at all"), namely the "ioctl"s provided by 4.xBSD.  They
  12. don't "take advantage of the flexibility afforded by the SCSI interface"
  13. in the sense that they let you do stuff that works only on SCSI tapes;
  14. the "ioctl"s include one to perform "special functions", including
  15. spacing forwards and backwards by files and by blocks, rewinding,
  16. rewind-and-unload, etc., but you can do those on non-SCSI tape drives as
  17. well. 
  18.  
  19. >I have heard rumors that AT&T has come up with a proposal (or perhaps a
  20. >de-facto standard in SVR4), but don't have any details.  Can anyone
  21. >supply me with some?
  22.  
  23. All I know of is that AT&T provides, in the "Berkeley compatibility"
  24. package, the 4.xBSD (or maybe SunOS 4.x, derived from 4.xBSD) "mt"
  25. command, and it probably uses the BSD "ioctl"s.  They provide
  26. <sys/mtio.h> (the include file that defines those "ioctl"s, and the
  27. commands they perform and data structures they use), but only as part of
  28. the compatibility package, not as an official part of S5R4.  In fact,
  29. the S5R4 "BSD/XENIX(R) Compatibility Guide" says, about the "mt"
  30. command:
  31.  
  32.     Both rely in a set of "ioctl"s that are not present in default
  33.     UNIX System V.  However, users with new or enhanced device
  34.     drivers may take advantage of this command.
  35.  
  36. Which means that, if you want to provide them with your S5 port, you can
  37. do so; if you're going to provide "ioctl"s of that sort, it's probably
  38. best to provide the BSD ones or ones based on them.
  39.  
  40. >Is there any standard action for what a tape driver should do with
  41. >internal flags (End-Of-Media, Filemark, etc.) when it receives an ioctl
  42. >call (like, clear the "DataWritten" flag so filemark writing won't be
  43. >performed after an ioctl)?
  44.  
  45. No official one; the drivers I know of tend to clear the "data written"
  46. flag after repositioning the tape.
  47.  
  48. >Is there any standard defined for what drivers should do with the
  49. >bp->b_blkno?  Early AT&T drivers (the Kennedy tape drive?) would
  50. >support block device IO to tapes, and would space the requested number
  51. >of 512-byte blocks if the b_blkno didn't match the driver's idea of
  52. >where it was.  So what happens with, say, 5K blocks on a 1/2" tape
  53. >reel?  Or should the driver just ignore the bp->b_blkno field
  54. >altogether?
  55.  
  56. Some drivers use it, some ignore it.  I wouldn't go out of my way to pay
  57. attention to it; it makes the driver more complicated and, given the
  58. problem you note, and the fact that most of the mag tape use I'm
  59. familiar with involves programs that don't seek around the tape, and the
  60. fact that seeking on mag tapes is generally rather slow, I doubt it
  61. actually makes life any better if the driver *does* try to pretend that
  62. "lseek()" works on a mag tape. 
  63.  
  64. Another disadvantage of the block device is that it has to pick some
  65. arbitrary block size; said block size may not match the block size on
  66. the tape (unless you're talking tapes like QIC tapes with a standard
  67. block size), and may also be smaller than you'd like (512-byte blocks,
  68. which are the default, at least in most non-4.[23]BSD systems, are
  69. rather silly on 1/2" tapes, for instance).
  70.  
  71. >These questions are prompted by the infamous exabyte tape drive.
  72.  
  73. The BSD "ioctl"s long antedate Exabytes; they apply to all tapes, and
  74. make life nicer on all tapes.
  75.  
  76. Volume-Number: Volume 20, Number 17
  77.  
  78.