home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / os / linux / 24989 < prev    next >
Encoding:
Text File  |  1993-01-21  |  2.7 KB  |  54 lines

  1. Newsgroups: comp.os.linux
  2. Path: sparky!uunet!usc!howland.reston.ans.net!bogus.sura.net!ra!tantalus.nrl.navy.mil!eric
  3. From: eric@tantalus.nrl.navy.mil (Eric Youngdale)
  4. Subject: Re: SCSI Autodetect? Static table? (Was:
  5. Message-ID: <C17oy4.Bry@ra.nrl.navy.mil>
  6. Sender: usenet@ra.nrl.navy.mil
  7. Organization: Naval Research Laboratory
  8. References: <1029319.54676.2177@kcbbs.gen.nz>
  9. Date: Thu, 21 Jan 1993 16:10:51 GMT
  10. Lines: 42
  11.  
  12. In article <1029319.54676.2177@kcbbs.gen.nz> Craig_Anderson@kcbbs.gen.nz (Craig Anderson) writes:
  13. >In article <1993Jan16.084315.7385@colorado.edu> drew@juliet.cs.colorado.edu (D
  14. >>Unfortunately, Linux uses a 16 bit dev_t, with only 8 bits reserved  
  15. >>for the minor number, which only lets us have 256 minor numbers.  
  16. >16 bits is enough.  It's bad software engineering to encode attributes 
  17. >into the minor number (other than some abstract concept of disk 1, 
  18. >disk 2, disk 3). 
  19. >For a better (tho still quick and dirty) method, how about having a 
  20. >table in the kernel (mapping the scsi id, lun, partition, and N bytes 
  21. >of device specific stuff to a major/minor number - obviously the generic 
  22. >implementation is M+N bytes of device specific stuff with M bytes defined 
  23. >for the scsi driver).  Then a simple program could be used to patch 
  24. >this table (on disk and/or in mem) in the kernel.  No kernel rebuilds 
  25. >required, allows an arbitrary amount of information to be associated with 
  26. >each device, is simple to implement and no less efficient at runtime. 
  27.  
  28.     Well, such a table effectively already exists, but it is built up
  29. automatically at boot time, so it never exists on disk.  I am opposed to the
  30. idea of modifying the table in memory because you could easily corrupt a disk
  31. if you started switching around disk ID numbers on the fly.
  32.  
  33.     I am sympathetic to those who are concerned about device renumbering if
  34. they take a disk out of the system.  How about if we (they) add some symlink
  35. like /dev/scdisk-a0 /dev/scdisk-b1, etc, and have these point at the correct
  36. disks and/or partitions.  If you remove a disk from the system, you can simply
  37. modify the symlinks to point to the new names for the partitions.  Heck, these
  38. could even be automatically generated at boot time in rc.local, so that you do
  39. not have to worry about changing these whenever you add/remove a disk.
  40.  
  41.     I could add an ioctl that would return the ID and lun for a given scsi
  42. device in order to make it easier to automate the procedure.  How do people
  43. feel about this approach?
  44.  
  45. -Eric
  46.  
  47. -- 
  48. A host is a host from coast to coast.....eric@tantalus.nrl.navy.mil
  49. & no one will talk to a host that's close..........................
  50. Unless the host (that isn't close).................................
  51. is busy, hung or dead................................Eric Youngdale
  52.