Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ bzb(4) — A/UX 2.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

dp(1M)

pname(1M)

altblk(4)

dpme(4)

gd(7)

torecovery(8)




bzb(4) bzb(4)
NAME bzb - format of Block Zero Blocks SYNOPSIS #include <sys/types.h> #include <apple/types.h> #include <apple/bzb.h> DESCRIPTION The Block Zero Block structure occupies the first sizeof(struct bzb) bytes of the dpme_boot_args field of each A/UX disk partition map entry. This structure contains ex- tra partition identification information that is of interest only to A/UX. The types of data stored in a Block Zero Block include file system identification and status informa- tion. The format of a Block Zero Block is struct bzb /* block zero block format */ { u32 bzb_magic; /* magic number */ u8 bzb_cluster; /* autorecovery cluster grouping */ u8 bzb_type; /* FS type */ u16 bzb_inode; /* bad block inode number */ u16 bzb_root:1, /* FS is a root FS */ bzb_usr:1, /* FS is a usr FS */ bzb_crit:1, /* FS is a critical FS */ bzb_rsrvd:13; /* reserved for later use */ u16 bzb_filler; /* pad bitfield to 32 bits */ time_t bzb_tmade; /* time of FS creation */ time_t bzb_tmount; /* time of last mount */ time_t bzb_tumount; /* time of last umount */ ABM bzb_abm; /* altblk map info */ }; typedef struct bzb BZB; #define BZBMAGIC ((u32) 0xABADBABE /* BZB magic number */ #define dpme_bzb dpme_boot_args /* ** File system types */ #define FST ((u8) 0x1) /* standard A/UX FS */ #define FSTEFS ((u8) 0x2) /* autorecovery FS */ #define FSTSFS ((u8) 0x3) /* swap FS */ FIELD DESCRIPTIONS bzb_magic This field should always contain the magic number BZBMAGIC. If this field is not set to BZBMAGIC, the information in the Block Zero Block should be treated April, 1990 1



bzb(4) bzb(4)
as invalid. bzb_cluster The value of this field determines the autorecovery(8) cluster to which the associated disk partition belongs. bzb_type This field identifies the type of A/UX file system corresponding to this Block Zero Block. Examples of A/UX file systems are regular file systems, au- torecovery file systems, and swap file systems (for these types, this field's values would be FST, FSTEFS, and FSTSFS, respectively). bzb_inode If nonzero, this field contains the number of the inode corresponding to the bad block file in the correspond- ing partition that will be used for bad blocking. If this field's value is zero, there is no bad block inode/file allocated. This file is made up of blocks that are bad (that is, blocks containing the contents of this file are all bad). This keeps the bad blocks out of the free list across fscks. This field is gen- erally used only for file systems that reside on physi- cal disks that lack hardware bad blocking or that sup- port hardware bad blocking but have run out of spare bad blocks. This field is not supported for swap file systems. The only supported values for this field are zero and one. bzb_root When on, this bit indicates that the file system locat- ed on the corresponding partition is a root file sys- tem. bzb_usr When on, this bit indicates that the file system locat- ed on the corresponding partition is a usr file system. If both this field and the bzb_root are on, the file system is a root/usr file system. bzb_crit When on, this bit indicates that the file system locat- ed on the corresponding partition is a critical file system. A critical file system receives special treat- ment during the Bad Block portion of autorecovery. The swap file system is an example of a critical file sys- tem, and therefore, all swap file system Block Zero Blocks should have this field set. 2 April, 1990



bzb(4) bzb(4)
If this bit is on, no attempt will be made to create or use a bad block file for bad block handling. bzb_rsrvd This field contains bits reserved for later use. bzb_filler This field is reserved for later use. bzb_tmade This field contains a time-stamp which indicates when the file system located on the corresponding partition was created. This field's value is the standard A/UX time-stamp value (as returned from time(2)). The value of this field can be set and retrieved through calls to ioctl(2). See gd(7) for more details. bzb_tmount This field indicates the date the last mount(3) (or equivalent routine) call was made on the file system located on the corresponding partition. In some cases, such as on a root file system during startup, this field should be set to the mount(3) equivalent date. This field is not updated if a file system is mounted read-only. The value of this field can be set and re- trieved through calls to ioctl(2). See gd(7) for more details. bzb_tumount This field indicates the date the last umount(3) (or equivalent routine) call was made on the file system located on the corresponding partition. In some cases, such as root file system during shutdown, this field should be set to the umount(3) equivalent date. This field is not updated if an file system was mounted read-only. The value of this field can be set and re- trieved through calls to ioctl(2). See gd(7) for more details. bzb_abm This field is the alternate block map structure for the associated partition. See altblk(4) for more details about this structure. The value of this field can be retrieved through calls to ioctl(2). See gd(7) for more details. SEE ALSO dp(1M), pname(1M), altblk(4), dpme(4), gd(7), au- torecovery(8). April, 1990 3

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