altblk(4) altblk(4)
NAME
altblk - alternate block information for bad block handling
SYNOPSIS
#include <altblk.h>
DESCRIPTION
altblk is the data structure used by badblk(1M) to handle
bad blocks for disk drives that support soft sector bad
block remapping.
The layout of this structure is as follows:
#define MAXALT 50 /* max alternate disk blocks */
#define ALTMAGIC 0xDBDF /* bad block information
is valid flag */
/*
* structure for alternate block mapping
*/
struct a_map {
long a_altbk; /* bad block */
long a_index; /* relative bad block index */
};
/*
* disk header block format for alternate block mapping
*/
struct altblk {
char a_fill[BSIZE-sizeof(struct a_map)-4*sizeof(long)];
/* fill to make structure
BSIZE bytes long */
struct a_map a_map[1]; /* mapping */
long a_magic; /* verification code
(ALTMAGIC) */
long a_count; /* bad block count */
long a_nicbad; /* max number of bad blocks */
long a_maxalt; /* max alt block used so far */
};
This structure describes the upper portion of block 0 of
each physical disk. The array amap is inverted (i.e., it
is indexed backwards). The specific fields in altblk are:
amaxalt the next usable block in bad block area
relative to the start of the bad block area
anicbad the maximum number of elements in the amap
structure
acount the number of bad blocks currently remapped on
Page 1 (last mod. 1/14/87)
altblk(4) altblk(4)
the disk
amagic a magic number for verification
amap bad block remap information
SEE ALSO
badblk(1M).
Page 2 (last mod. 1/14/87)