DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH
 

filesystem(FP)


filesystem -- format of filesystem types

Syntax

#include <sys/types.h>
#include <sys/param.h>

#include <sys/fs/*filsys.h>

Description

A filesystem organizes a collection of files and directories that are stored on one partition of a disk. Every filesystem storage volume (for example, a hard disk) has a common format for certain vital information. Every such volume is divided into a certain number of blocks. The filesystem architectures are specified in files in the <sys/fs> directory. The supported filesystems and their corresponding include files are listed here:

File Filesystem architecture
dtfilsys.h DTFS (Desktop Filesystem, a compression filesystem)
hsfilsys.h HS (High Sierra), ISO9660 and RCKRDG (Rock Ridge)
htfilesys.h S51K (UNIX filesystem), HTFS (High Throughput Filesystem), EAFS (Enhanced ACER Fast Filesystem) and AFS (ACER Fast Filesystem)
dosfilsys.h DOS
xxfilsys.h XENIX

 +------------+--------------------------------+
 |File        | Filesystem architecture        |
 |dtfilsys.h  | DTFS (Desktop Filesystem, a    |
 |            | compression filesystem)        |
 |hsfilsys.h  | HS (High Sierra), ISO9660 and  |
 |            | RCKRDG (Rock Ridge)            |
 |htfilesys.h | S51K (UNIX filesystem), HTFS   |
 |            | (High Throughput Filesystem),  |
 |            | EAFS (Enhanced ACER Fast       |
 |            | Filesystem) and AFS (ACER Fast |
 |            | Filesystem)                    |
 |dosfilsys.h | DOS                            |
 |xxfilsys.h  | XENIX                          |
 +------------+--------------------------------+

The DOS filesystem is a 512-byte filesystem. Consult a DOS reference guide for more information. The other filesystems are described here.

The internal structure of a filesystem contains these major sections:


super block
A special data block that contains global information about the filesystem. The super block resides in the beginning of logical block 1 of every filesystem (block 0 is unused and available to contain a bootstrap program or other information). It contains information like the filesystem architecture being used (for example, s_type), the size of the inode array (for example, s_isize), the list of available blocks (for example, s_free), and the list of available inodes (for example, s_inode). It also contains some status information.

inode
A separate inode is assigned for each file and directory in the filesystem and contains control and status information as well as pointers to the data blocks that are used to hold the data for that file or directory. The inodes are usually obtained from an array of available inodes (the ilist) and are referenced by an index into that array (called an inumber). For the format of an inode, see inode(FP))


NOTE: For DTFS, inodes can be allocated anywhere in the filesystem and are not held in a pre-allocated array.


data storage blocks
Storage for the data in the files and directories that are part of the filesystem. These are referenced by number and maintained through the inodes of the files that use them.

Files


/usr/include/sys/fs/*filsys.h

See also

fsck(ADM), fsname(ADM), inode(FP), labelit(ADM), mkfs(ADM)
© 2003 File Formats for Programming (FP)
SCO OpenServer Release 5.0.7 -- 11 February 2003