bzb(4) bzb(4)NAME bzb - Disk block zero format SYNOPSIS #include <sys/types.h> #include <apple/types.h> #include <apple/bzb.h> DESCRIPTION bzb is a structure that occupies the first group of bytes of the dpme_boot_args member of a DPME structure, which corresponds to a A/UX disk-partition-map entry. The area it occupies is determined by the size of the bzb structure. The disk-block-zero structure contains extra partition- identification information that is of interest only to A/UX. The types of data stored in a disk-block-zero structure include file-system identification and status information. The disk-block-zero structure is defined as follows: 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:8, /* reserved for later use */ bzb_slice:5; /* slice number to associate with plus one (0 indicates no number) */ 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 unmount */ 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 */ March 1993 1
bzb(4) bzb(4)Here is a description of each member of the disk-block-zero structure: bzb_magic This member should always contain the magic number BZBMAGIC. If this member is not set to BZBMAGIC, the remaining information in the disk-block-zero structure is considered invalid. bzb_cluster This member is no longer used. Previously it was used to store a cluster number. It remains allocated for the purpose of backward compatibility. bzb_type This member identifies the type of A/UX file system that resides within the partition that the disk-block- zero structure describes. Examples of A/UX file systems are regular file systems and and swap areas. bzb_inode If nonzero, this member contains the inode number for the bad-block file within the partition that the disk- block-zero structure describes. A zero in this member indicates that no file has been designated for the purpose of receiving bad blocks. The file identified by this inode number is assigned any bad blocks. Accordingly, this file consists of bad blocks only. The allocation of bad blocks into this file keeps the free-blocks list free of any bad blocks detected through prior fsck operations. This member is generally used only for file systems that reside on physical disks that lack hardware bad-blocking, or that support hardware bad-blocking but have run out of spare bad blocks. This bad-blocking support is not applicable to swap areas or file systems other than UNIX file systems. The only supported values for this member are zero and one. bzb_root When on, this bit indicates the presence of a (bootable) root file system in the partition that the disk-block-zero structure describes. bzb_usr When on, this bit indicates the presence of the Usr file system (containing the files that customarily reside in the /usr directory) in the partition that the disk-zero-block structure describes. When two bits are set, the bit of this member and the bit of the bzb_root 2 March 1993
bzb(4) bzb(4)member, they identify the file system as a root file system that also contains the files located in /usr. bzb_crit When on, this bit indicates the presence of a critical file system or a swap area in the partition that the disk-zero-block structure describes. A critical file system or swap area receives special treatment when bad-block operations are being performed for this partition. The swap file system is an example of a critical file system. Accordingly, the bit of this member should be set inside all disk-block-zero structures that describe swap partitions. 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 member contains bits reserved for later use. bzb_slice This member is used to permanently set the slice number for a partition. If the value of bzb_slice is nonzero, the partition will automatically be associated with a slice number equal to a value one less than the stored value. bzb_filler This member is reserved for later use. bzb_tmade This member contains a time stamp value indicating the creation date for the file system within the partition that the disk-zero-block structure describes. The value of this member is the standard A/UX time-stamp value (as returned from time(2)). The value of this member can be set and retrieved through calls to ioctl. See gd(7) for more details. bzb_tmount This member contains the date of the last mount (or equivalent) operation for the file system within the partition that the disk-zero-block structure describes. During startup, the kernel performs a roughly equivalent operation on the root file system due to its opening of administrative files there that help establish the initial operating environment. This member is not updated if a file system was mounted read-only. The value of this member can be set and retrieved through calls to ioctl. See gd(7) for more details. March 1993 3
bzb(4) bzb(4)bzb_tumount This member contains the date of the last umount (or equivalent) operation for the file system within the partition that the disk-zero-block structure describes. During normal shutdown, the kernel performs a roughly equivalent operation due to its closing of various administrative files and its final updates to the superblock for the root file system. This member is not updated if a file system was mounted read-only. The value of this member can be set and retrieved through calls to ioctl. See gd(7) for more details. bzb_abm This member is the alternate-block-map structure for a partition. See altblk(4) for more details about this structure. The value of this member can be retrieved through calls to ioctl. See gd(7) for more details. SEE ALSO altblk(4), dpme(4), gd(7) dp(1M), pname(1M), autorecovery(8) in A/UX System Administrator's Reference 4 March 1993