home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / unix / bsd / 4807 < prev    next >
Encoding:
Text File  |  1992-08-29  |  1.9 KB  |  47 lines

  1. Newsgroups: comp.unix.bsd
  2. Path: sparky!uunet!mcsun!sunic!aun.uninett.no!barsoom!barsoom!tih
  3. From: tih@barsoom.nhh.no (Tom Ivar Helbekkmo)
  4. Subject: 386BSD: Better bad144 handling for my WD driver.
  5. Message-ID: <tih.715007389@barsoom>
  6. Sender: news@barsoom.nhh.no (USENET News System)
  7. Organization: Norwegian School of Economics
  8. Date: Fri, 28 Aug 1992 13:09:49 GMT
  9. Lines: 36
  10.  
  11. For those of you who have picked up my modified wd driver and stuff
  12. from barsoom.nhh.no, here's a little change that should be put in
  13. there (and that's in the version now on barsoom):
  14.  
  15. In wdstart(), where it scans for bad blocks, the scan through the
  16. bad block list is performed a bit too often -- I didn't consider
  17. the fact that wdstart() is called at interrupt-time for every
  18. sector in a multi-sector transfer.  When this happens, the scan
  19. is not needed, and indeed can cause the driver to be too slow to
  20. handle the transfer properly, thus dropping into one sector per
  21. revolution mode.  This is *slow*!  The test at the top of the loop
  22. should be:
  23.  
  24. #ifdef TIHBAD144
  25.     /* Check for bad sectors if we have them, and not formatting */
  26. #ifdef  B_FORMAT
  27.     if ((du->dk_flags & DKFL_BADSECT) && !(bp->b_flags & B_FORMAT) &&
  28.         ((du->dk_skip == 0) || (du->dk_flags & DKFL_SINGLE))) {
  29. #else
  30.     if ((du->dk_flags & DKFL_BADSECT) &&
  31.         ((du->dk_skip == 0) || (du->dk_flags & DKFL_SINGLE))) {
  32. #endif
  33.  
  34. The point is, of course, that if du->dk_skip is nonzero, and we're
  35. not in single sector mode, then we've already checked these blocks.
  36.  
  37. (I noticed this when I ran Jim Bevier's new bad144 with the -s
  38. option he added.  The scan suddenly slowed to a crawl once it got
  39. past a bad track on one of my disks -- comparing with each of those
  40. 26 block numbers for each sector remaining in the transfer just took
  41. too much time...  :-)  Thanks, Jim -- good work!)
  42.  
  43. -tih
  44. --
  45. Tom Ivar Helbekkmo, NHH, Bergen, Norway.  Telephone: +47-5-959205
  46. Postmaster for domain nhh.no.   Internet mail: tih@barsoom.nhh.no
  47.