xref: /titanic_50/usr/src/uts/common/sys/dkbad.h (revision e07d9cb85217949d497b02d7211de8a197d2f2eb)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License, Version 1.0 only
6  * (the "License").  You may not use this file except in compliance
7  * with the License.
8  *
9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10  * or http://www.opensolaris.org/os/licensing.
11  * See the License for the specific language governing permissions
12  * and limitations under the License.
13  *
14  * When distributing Covered Code, include this CDDL HEADER in each
15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16  * If applicable, add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your own identifying
18  * information: Portions Copyright [yyyy] [name of copyright owner]
19  *
20  * CDDL HEADER END
21  */
22 /*
23  * Copyright (c) 1991,1997-1998 by Sun Microsystems, Inc.
24  * All rights reserved.
25  */
26 
27 #ifndef	_SYS_DKBAD_H
28 #define	_SYS_DKBAD_H
29 
30 #pragma ident	"%Z%%M%	%I%	%E% SMI"	/* UCB 4.3 81/05/10 */
31 
32 #ifdef	__cplusplus
33 extern "C" {
34 #endif
35 
36 /*
37  * Definitions needed to perform bad sector
38  * revectoring ala DEC STD 144.
39  *
40  * The bad sector information is located in the
41  * first 5 even numbered sectors of the last
42  * track of the disk pack.  There are five
43  * identical copies of the information, described
44  * by the dkbad structure.
45  *
46  * Replacement sectors are allocated starting with
47  * the first sector before the bad sector information
48  * and working backwards towards the beginning of
49  * the disk.  A maximum of 126 bad sectors are supported.
50  * The position of the bad sector in the bad sector table
51  * determines which replacement sector it corresponds to.
52  *
53  * The bad sector information and replacement sectors
54  * are conventionally only accessible through the
55  * 'c' file system partition of the disk.  If that
56  * partition is used for a file system, the user is
57  * responsible for making sure that it does not overlap
58  * the bad sector information or any replacement sector.s
59  */
60 
61 #define	NDKBAD		126		/* # of entries maximum */
62 
63 struct dkbad {
64 	long	bt_csn;			/* cartridge serial number */
65 	ushort_t bt_mbz;		/* unused; should be 0 */
66 	ushort_t bt_flag;		/* -1 => alignment cartridge */
67 	struct bt_bad {
68 		short	bt_cyl;		/* cylinder number of bad sector */
69 		short	bt_trksec;	/* track and sector number */
70 	} bt_bad[NDKBAD];
71 };
72 
73 #ifdef	__cplusplus
74 }
75 #endif
76 
77 #endif	/* _SYS_DKBAD_H */
78