efs(4) efs(4)
efs - layout of the Extent File System
#include <sys/param.h>
#include <sys/fs/efs.h>
An Extent File System can reside on a regular disk partition or on a
logical volume; see lv(1M). The disk partition or volume is divided into
a certain number of 512-byte sectors, also called basic blocks. The
current maximum size limit of an Extent File System is 16777214 blocks,
equivalent to 8 gigabytes.
The Extent File System imposes a common format for certain vital
information on its underlying storage medium. Basic block 0 is unused
and is available to contain a bootstrap program or other information.
Basic block 1 is the superblock. The format of an Extent File System
superblock is:
/*
* Structure of the superblock for the Extent File System
*/
struct efs {
/*
* This portion is read off the volume
*/
long fs_size; /* size of filesystem, in sectors */
long fs_firstcg; /* bb offset to first cg */
long fs_cgfsize; /* size of cylinder group in bb's */
short fs_cgisize; /* bb's in inodes per cylinder group */
short fs_sectors; /* sectors per track */
short fs_heads; /* heads per cylinder */
short fs_ncg; /* # of groups in filesystem */
short fs_dirty; /* fs needs to be fsck'd */
time_t fs_time; /* last superblock update */
long fs_magic; /* magic number */
char fs_fname[6]; /* filesystem name */
char fs_fpack[6]; /* filesystem pack name */
long fs_bmsize; /* size of bitmap in bytes */
long fs_tfree; /* total free data blocks */
long fs_tinode; /* total free inodes */
long fs_bmblock; /* bitmap location */
long fs_replsb; /* location of replicated superblock. */
char fs_spare[24]; /* space for expansion */
long fs_checksum; /* checksum of volume portion of fs */
/*
* The remainder of this structure, defined fully in
* <sys/fs/efs_sb.h> is used by the operating system only.
*/
};
Page 1
efs(4) efs(4)
The struct efs that is defined in <sys/fs/efs_sb.h> contains more fields.
The extra fields are used internally by the operating system and are not
discussed here. If in doubt, consult the include file for any recent
changes to both the section discussed here and changes to relevant
definitions.
fs_size holds the size in basic blocks of the filesystem. This variable
is filled in when the filesystem is first created with mkfs(1M).
fs_firstcg contains the basic block offset to the first cylinder group.
There are fs_ncg cylinder groups contained in the filesystem. Each
cylinder group is composed of fs_cgfsize basic blocks, of which
fs_cgisize basic blocks are used for inodes.
fs_sectors and fs_heads are used to specify the geometry of the
underlying disk containing the filesystem. fs_heads is in fact currently
unused and should not be relied upon.
fs_dirty is a flag that indicates if the filesystem needs to be checked
by the fsck(1M) program.
The fs_time field contains the time stamp of when the filesystem was last
modified.
fs_name holds the name of the filesystem (where it is mounted, more or
less) and fs_fpack contains which volume this filesystem is. The
fs_fpack field is singularly useless, but is provided for utility
compatibility.
fs_magic is used to tag the superblock of the filesystem as an Extent
File System. There are two values that are currently used and a macro
used to test for either one.
#define EFS_MAGIC 0x072959
#define EFS_NEWMAGIC 0x07295A
#define IS_EFS_MAGIC(x) ((x == EFS_MAGIC) || (x == EFS_NEWMAGIC))
The NEWMAGIC version was added in IRIX 3.3 when the superblock format
changed slightly. Filesystems created with that version of mkfs or later
(or modified with mkfs -r or extended with growfs) get the new magic
number; otherwise the older magic number is retained, if present.
The fs_bmsize field contains, in bytes, the size of the data block
bitmap. The data block bitmap is used for data block allocation. Each
one in the bitmap indicates a free block.
The fs_bmblock field contains the location of the bitmap if it has been
moved from its default location (basic block 2) because the filesystem
has been constructed on a logical volume that has been extended (see
growfs(1M)).
Page 2
efs(4) efs(4)
fs_tfree and fs_tinode contain the total free blocks and inodes,
respectively.
The fs_replsb field contains the location of a replicated superblock, if
one exists.
The fs_spare field is reserved for future use.
Lastly, the fs_checksum variable holds a checksum of the above fields
(not including itself).
During the mount(1M) of the filesystem, the fs_dirty and fs_checksum
fields are examined. If fs_dirty is non-zero, or the fs_checksum
variable does not match the systems computed checksum, the filesystem
must be cleaned with fsck before it can be mounted. If the filesystem is
the root partition, this check is ignored, as it is necessary to be able
to run fsck on a dirty root from a dirty root. For the format of an
inode and its flags, see inode(4).
/usr/include/sys/fs/efs*.h
/usr/include/sys/stat.h
fsck(1M), growfs(1M), mkfs(1M), inode(4).
filesystems(4) filesystems(4)
filesystems: cdfs, dos, fat, EFS, hfs, mac, iso9660, cd-rom, kfs, nfs,
XFS, rockridge - IRIX filesystem types
IRIX supports a number of different filesystems. Some of these types are
names that can be used with the mount(1) command's -t option. Others are
just common names and cannot be used with the mount command. An example
of this is the RockRidge type, which is a superset of the iso9660
filesystem type. Therefore RockRidge filesystems are mounted with a
command similar to this:
mount -t iso9660 -o ro /dev/rdsk/dks0d3vol /CDROM
The following filesystem types are supported:
bds Not a file system type, an extension to NFS for bulk data
transfers. The BDSpro server is an optional product and must
be purchased separately.
cdfs (CD-ROM)
Same as type iso9660 (see below); this is the ABI compliant
name.
dos (fat) The filesystem used by many personal computers. Types 1, 4,
and 6 are supported, included long names where supported.
Type 5 (extended partitions) are supported only if mounted
with the partition # options. IRIX support for dos
filesystems is restricted to removable disk devices such as
floppy and floptical disks. Filenames on dos filesystems are
restricted to up to an eight character name followed by an
optional period and three character filename extension, for
most types. Longer names are supported to a limited degree,
on the types where the native OS supports them.
EFS The older extent-based disk filesystem used by IRIX for disks
and also for IRIX software distribution CD-ROMs. See efs(4)
for more details.
fd A filesystem used to access process file descriptors.
hfs (mac) The filesystem used by Macintosh computers. IRIX support for
hfs filesystems is restricted to removable disk devices such
as floppy and floptical disks and to CD-ROMs. A hfs file is
composed of three portions: a data fork, a resource fork,
and a desktop information entry. The data fork appears in a
normal directory. The resource fork in a special directory
(.HSResource) in the file's directory. The desktop
information for all files in a directory is contained in the
special file .HSancillary.
Page 1
filesystems(4) filesystems(4)
iso9660 (CD-ROM)
A CD-ROM filesystem type conforming to ISO standard 9660.
iso9660 CD-ROMs are used when the contents of the CD-ROM is
intended to be readable by a variety of operating systems.
You must install the optional subsystem eoe.sw.cdrom to be
able to mount and read an iso9660 CD-ROM. Also see RockRidge
below. Note that IRIX software distribution CD-ROMs are not
iso9660 filesystems, they are efs filesystems. Music CDs are
not file structured and are not used as filesystems. Music
CDs can be played using the CD-ROM drive using cdman(1) or
cdplayer(1).
kfs A network filesystem used to access disks on located on
remote computers using AppleShare networking. Generally,
AppleShare networking is used to access Macintosh computers.
Except for the disk location, kfs filesystems are identical
to hfs filesystems.
nfs A network filesystem used to access disks located on remote
computers. Both NFS Version 2, and NFS Version 3 are
supported. NFS is an optional product and must be purchased
separately. The subsystem nfs.sw.nfs must be installed to
use NFS.
proc A filesystem that provides access to the image of each active
process in the system.
hwgfs A filesystem that provides access to the system hardware
configuration.
RockRidge A filesystem layered on type of the iso9660 filesystem type
(see above) that provides semantics closer to those of
standard UNIX filesystems. In particular, it supplies file
permissions and allows for directory hierarchies more than 8
levels deep.
XFS The next-generation 64-bit high performance journaling
filesystem used by IRIX for disks. See xfs(4) for more
details.
cachefs A caching filesystem for use with efs, xfs, nfs, nfs3,
iso9660, hfs, dos, kfs, and cdfs. See cachefs(4) for
details.
The nfs and kfs filesystems are optional products. Support for iso9660
filesystems is in the optional subsystem eoe.sw.cdrom.
IRIX implements dos, hfs, iso9660, and kfs filesystems as user mode NFS
daemons. In some cases errors detected by these daemons are reported as
NFS errors. Although NFS is a product option, support for these
filesystem types is not dependent on the installation of NFS.
Page 2
filesystems(4) filesystems(4)
exportfs(1M), fpck(1M), fsck(1M), mediad(1M), mkfp(1M), mkfs(1M),
mount(1M), mount_kfs(1M), efs(4), fd(4), fstab(4), hwgfs(4), proc(4),
xfs(4).
PPPPaaaaggggeeee 3333 [ Back ]
|