Managing filesystem types

s5 inodes

The term ``inode'' stands for information node. A list of inodes is called an ``i-list'' and the position of an inode in an i-list is called an ``i-number''.

An inode contains all the information about a file except its name, which is kept in a directory. Inodes are 64 bytes long: on a disk with 512-byte physical blocks there are 8 of them in a physical block. The length of an i-list is not fixed; it depends on the number of inodes specified when the filesystem is created.

What does an s5 inode contain?

An s5 inode contains the following:

The s5 disk inode's disk block addresses

The array of 13 disk block addresses is the heart of the inode.

The next figure illustrates this chaining of address blocks stemming from the inode.

The address chain in an s5 filesystem

The following table shows the number of bytes addressable by the different levels of indirection in the inode address array for s5 filesystems. These numbers are calculated using the logical block size of the filesystem and the number of bytes (4) used to hold an address.

  Maximum number of bytes addressable by

Logical Block Size

Direct Blocks

Single Indirect Blocks Double Indirect Blocks Triple Indirect Blocks
512 bytes 5120 64KB 8MB 1GB
1024 bytes 10240 256KB 64MB 16GB
2048 bytes 20480 1MB 512MB 256GB

The table shows the number of bytes addressable using the level of indirection in the column header plus all lower levels of addressing. For example, the table values for single indirect blocks also include bytes addressable by direct blocks; and the table values for triple indirect blocks include bytes addressable by direct blocks and single and double indirect blocks.

The theoretical maximum size of an s5 system file is the same as the size of a file addressable with triple indirection (shown in the last column of the table). In practice, however, file size is limited by the size field in the inode. This is a 32-bit field, so file sizes are limited to 2GB.

© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 22 April 2004