HP-UX Reference (11i v1 05/09) - 4 File Formats (vol 8)
f
fs(4) fs(4)
NAME
fs - format of file system volume
SYNOPSIS
#include <sys/types.h>
#include <sys/param.h>
#include <sys/fs.h>
#include <sys/inode.h>
#include <sys/ino.h>
#include <sys/sysmacros.h>
DESCRIPTION
Every file system storage volume has a common format for certain vital information. The first 8 kbytes on
a volume contain a volume header which identifies that volume as a Logical Interchange Format
(LIF)
volume. Such volume may be divided into a number of sections.
Each section can contain a file system. The first 8 kbytes in each section is ignored, except where it coin-
cides with the volume header discussed above. The actual file system begins next with the "super block."
The layout of the super block as defined by the include file <sys/fs.h
> is:
#define FS_MAGIC 0x011954
#define FS_MAGIC_LFN 0x095014
#define FS_CLEAN 0x17
#define FS_OK 0x53
#define FS_NOTOK 0x31
struct fs {
struct fs *fs_link; /* linked list of file systems */
struct fs *fs_rlink; /* used for incore super blocks */
daddr_t fs_sblkno; /* addr of super-block in filesys */
daddr_t fs_cblkno; /* offset of cyl-block in filesys */
daddr_t fs_iblkno; /* offset of inode-blocks in filesys*/
daddr_t fs_dblkno; /* offset of first data after cg */
long fs_cgoffset; /* cylinder group offset in cylinder*/
long fs_cgmask; /* used to calc mod fs_ntrak */
time_t fs_time; /* last time written */
long fs_size; /* number of blocks in fs */
long fs_dsize; /* number of data blocks in fs */
long fs_ncg; /* number of cylinder groups */
long fs_bsize; /* size of basic blocks in fs */
long fs_fsize; /* size of frag blocks in fs */
long fs_frag; /* number of frags in a block in fs*/
/* these are configuration parameters */
long fs_minfree; /* minimum percentage of free blocks*/
long fs_rotdelay; /* num of ms for optimal next block */
long fs_rps; /* disk revolutions per second */
/* these fields can be computed from the others */
long fs_bmask; /* ‘‘blkoff’’ calc of blk offsets */
long fs_fmask; /* ‘‘fragoff’’ calc of frag offsets */
long fs_bshift; /* ‘‘lblkno’’ calc of logical blkno */
long fs_fshift; /* ‘‘numfrags’’ calc number of frags*/
/* these are configuration parameters */
long fs_maxcontig; /* max number of contiguous blks */
long fs_maxbpg; /* max number of blks per cyl group */
/* these fields can be computed from the others */
long fs_fragshift; /* block to frag shift */
long fs_fsbtodb; /* fsbtodb and dbtofsb shift constant*/
long fs_sbsize; /* actual size of super block */
long fs_csmask; /* csum block offset */
long fs_csshift; /* csum block number */
long fs_nindir; /* value of NINDIR */
long fs_inopb; /* value of INOPB */
long fs_nspf; /* value of NSPF */
long fs_sparecon[6]; /* reserved for future constants */
HP-UX 11i Version 1: September 2005 − 1 − Hewlett-Packard Company Section 4−−53