1: /*
2: * Definitions needed to perform bad sector
3: * revectoring ala DEC STD 144.
4: *
5: * The bad sector information is located in the
6: * first 5 even numbered sectors of the last
7: * track of the disk pack. There are five
8: * identical copies of the information, described
9: * by the dkbad structure.
10: *
11: * Replacement sectors are allocated starting with
12: * the first sector before the bad sector information
13: * and working backwards towards the beginning of
14: * the disk. A maximum of MAXBAD bad sectors are supported
15: * per pack; MAXBAD may be redefined as conditions require,
16: * but may be 126 at most. It is small to save on the kernel
17: * memory required to hold these.
18: * The position of the bad sector in the bad sector table
19: * determines which replacement sector it corresponds to.
20: * Bad sectors in excess of MAXBAD will not be replaced
21: * automatically, but the bad-sector file on disk will be correct.
22: *
23: * The bad sector information and replacement sectors
24: * are conventionally only accessible through the
25: * 'h' file system partition of the disk. If that
26: * partition is used for a file system, the user is
27: * responsible for making sure that it does not overlap
28: * the bad sector information or any replacement sectors.
29: */
30:
31: #ifdef BADSECT
32:
33: #define MAXBAD 8
34:
35: struct dkbad {
36: long bt_csn; /* cartridge serial number */
37: u_short bt_mbz; /* unused; should be 0 */
38: u_short bt_flag; /* -1 => alignment cartridge */
39: struct bt_b {
40: u_short bt_cyl; /* cylinder number of bad sector */
41: u_short bt_trksec; /* track and sector number */
42: } bt_bad[MAXBAD];
43: };
44:
45: #if MAXBAD > 126
46: ERROR!
47: #endif
48: #endif BADSECT
49:
50: #define ECC 0
51: #define SSE 1
52: #define BSE 2
53: #define CONT 3
Defined struct's
bt_b
defined in line
39; used 2 times
dkbad
defined in line
35; used 24 times
Defined macros
BSE
defined in line
52; used 4 times
CONT
defined in line
53; used 8 times
ECC
defined in line
50; used 4 times
SSE
defined in line
51;
never used
Usage of this include