[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
How to map unit/cyl/head/sect to FEP-File? (continued)
Date: Thu, 1 Apr 1993 05:03 EST
From: email@example.com (Anton Beschta)
Date: Wed, 31 Mar 1993 12:50 -0500
From: Barry Margolin <firstname.lastname@example.org>
I can name that tune in 1 line:
(si:get-file-containing (si:dpn-from-address unit cyl head sect))
Date: Wed, 31 Mar 93 11:51:10 CST
From: email@example.com (David Gadbois)
The functions are SI:DPN-FROM-ADDRESS, which gives you the DPN from
the unit, cylinder, head, and sector numbers (remember that the FEP
gives these to you in octal!) and SI:GET-FILE-CONTAINING, which gives
you the file containing a DPN. If the error is in a LMFS partition,
be very careful not to splice out the bad block, lest complete mayhem
Thanks for the hint! And here are the three lines of code that
I had in mind (but were partially garbage colleced by time :-)
(si:dpn-from-address #o<unit> #o<cyl> #o<head> #o<sect>))))
Ok, now I know that there is a problem in my Genera 8.1 world load
file. I.e. the last two full GCs resulted in an irrecoverable disk
search error at exactly the same address.
I used to get disk search errors during dynamic GC's (I never did full
GC's) alot before I replaced my 3640 with a 3650, but diagnostics would
never find a problem with the block. I suspect there's something about
the way GC accesses the disk that tends to exacerbate minor problems
that the diagnostics don't notice.
But unfortunately si:fix-fep-file doesn't find any bad blocks in this
file! And I ran it more than once (even between above GCs because
at this time I mapped si:fix-fep-file over all active FEP files).
My next question is (more or less) straight forward:
How can I replace a certain block with a copy of it without having
si:fix-fep-file to find it?
I think this should do what you need:
(defun replace-fep-block (unit cylinder head sector)
(si:with-bad-block-structures (od da de)
(let ((dpn (si:dpn-from-address unit cylinder head sector))
(bad-block-info (make-instance 'si:bad-block-tester
(si:handle-bad-block bad-block-info dpn))))
This is just the function SI:ZAP-FEP-BLOCK with the :READ-ONLY T option
removed from the call to SI:HANDLE-BAD-BLOCK. This change will allow it
to offer the "Copy" option, which is what you want.