Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ altblk(4) — A/UX 2.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

badblk(1M)

dp(1M)

bzb(4)

gd(7)




altblk(4) altblk(4)
NAME altblk - alternate block information for bad block handling SYNOPSIS #include <sys/types.h> #include <apple/abm.h> DESCRIPTION abm is the data structure used by A/UX disk device drivers to handle bad blocks for disk partitions that support alter- nate block bad block handling. The abm structure can be re- trieved through an ioctl(2) with a request of GD_GETABM. The actual contents of the alternate block map can be re- trieved via the abmi structure through an ioctl(2) with a request of GD_GETMAP. The abmi structure is described in gd(7). The format of the abm structure is: struct abm /* altblk map info stored in bzb */ { int abmsize; /* size of map (bytes) */ int abments; /* number of used entries (bytes) */ daddrt abmstart; /* start of altblk map (phys blk num) */ }; typedef struct abm ABM; #define ABMENTSIZ (sizeof(long)) /* size of each map entry */ #define NOALTMAP ((daddrt) 0) /* value of abmoff field if no map */ #define ABMFREE -1 /* block not used */ #define ABMBADBLK -2 /* block is bad */ #define ABMABM -3 /* part of AltBlkMap */ #define ABMMAXVAL -16 /* last reserved map value */ Normally the alternate block area, that area between the end of the logical partition and the end of the physical parti- tion, will (optionally) contain an alternate block map and alternate block data blocks for alternate block handling. The alternate block map resides anywhere in the alternate block area, in a contiguous set of blocks. The format of the alternate block map is an array of long integers. Each indexed location in the array corresponds to a potential al- ternate block in the alternate block area. A location in the alternate block array (map) may either contain the number of a block in the logical partition of the disk par- tition which will be remapped, or it may contain a flag. The currently recognized flag values are ABM_FREE for avail- able blocks, ABM_BADBLK if the free block is bad, and April, 1990 1



altblk(4) altblk(4)
ABM_ABM to indicate that the block is allocated to the al- ternate block map. Flag values with in the range of ABM_ABM and ABM_MAXVAL are reserved for future use. Alternate block mapping may be disabled through an ioctl(2) with the request GD_ALTBLK. A bad block may be alternate blocked through an ioctl(2) with the request GD_MKBAD. FIELD DESCRIPTIONS abmsize This field contains the size of the alternate block map as measured in bytes. This value should always be evenly divisible by ABM_ENTSIZ. The value of this field should be consulted when requesting the contents of the alternate block map through an ioctl(2). abments The value of this field represents the byte offset of the next available entry in the alternate block map as measured from the beginning of the map. This field is maintained by the device driver. abmstart The value of this field is set to NO_ALTMAP to indicate that there is no alternate block map for the corresponding partition. If the value of this field is not set to NO_ALTMAP, then the value is the physical block number (relative to the start of the physical partition) of the first block of the alternate block map. SEE ALSO badblk(1M), dp(1M), bzb(4), gd(7). 2 April, 1990

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026