1 /*- 2 * Copyright (c) 1982, 1986 The Regents of the University of California. 3 * All rights reserved. 4 * 5 * %sccs.include.redist.c% 6 * 7 * @(#)dkbad.h 7.2 (Berkeley) 02/15/91 8 */ 9 10 /* 11 * Definitions needed to perform bad sector revectoring ala DEC STD 144. 12 * 13 * The bad sector information is located in the first 5 even numbered 14 * sectors of the last track of the disk pack. There are five identical 15 * copies of the information, described by the dkbad structure. 16 * 17 * Replacement sectors are allocated starting with the first sector before 18 * the bad sector information and working backwards towards the beginning of 19 * the disk. A maximum of 126 bad sectors are supported. The position of 20 * the bad sector in the bad sector table determines which replacement sector 21 * it corresponds to. 22 * 23 * The bad sector information and replacement sectors are conventionally 24 * only accessible through the 'c' file system partition of the disk. If 25 * that partition is used for a file system, the user is responsible for 26 * making sure that it does not overlap the bad sector information or any 27 * replacement sectors. 28 */ 29 struct dkbad { 30 long bt_csn; /* cartridge serial number */ 31 u_short bt_mbz; /* unused; should be 0 */ 32 u_short bt_flag; /* -1 => alignment cartridge */ 33 struct bt_bad { 34 u_short bt_cyl; /* cylinder number of bad sector */ 35 u_short bt_trksec; /* track and sector number */ 36 } bt_bad[126]; 37 }; 38 39 #define ECC 0 40 #define SSE 1 41 #define BSE 2 42 #define CONT 3 43